diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 11:24:19 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 08:58:40 +0000 |
commit | a8d5c91ba40ff7caefec55573990ce39fa77a123 (patch) | |
tree | 5f31fea5452ab6236f1999d9c57cf8f16752e71d /main/gcc | |
parent | 9e811d5cf8ba441bf682e1798f2755885e5d88cc (diff) | |
download | aports-a8d5c91ba40ff7caefec55573990ce39fa77a123.tar.bz2 aports-a8d5c91ba40ff7caefec55573990ce39fa77a123.tar.xz |
main/gcc: ugprade to 4.8.3
Diffstat (limited to 'main/gcc')
-rw-r--r-- | main/gcc/APKBUILD | 35 | ||||
-rw-r--r-- | main/gcc/ada-crossbuild.patch | 49 | ||||
-rw-r--r-- | main/gcc/ada-no-pie.patch | 17 | ||||
-rw-r--r-- | main/gcc/gcc-4.8-dynamic-linker.patch | 449 |
4 files changed, 16 insertions, 534 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 80b35827bd..b76009c451 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gcc -pkgver=4.8.2 +pkgver=4.8.3 _uclibc_abiver=0.9.32 _cross="" [ "$BOOTSTRAP" = "noheaders" ] && pkgname="gcc-pass1" @@ -9,7 +9,7 @@ _cross="" && _cross="-$CTARGET" pkgname="$pkgname$_cross" -pkgrel=10 +pkgrel=0 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" arch="all" @@ -171,7 +171,6 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 pt_gnu_eh_frame.patch uclibc-getipinfo.patch gcc-4.6-pr32219.patch - gcc-4.8-dynamic-linker.patch gcc-4.8-musl.patch gcc-4.8-musl-fix-iteratephdr.patch gcc-4.8-musl-libssp.patch @@ -189,7 +188,6 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 fix-cxxflags-for-target.patch ada-no-pie.patch ada-fixes.patch - ada-crossbuild.patch ada-shared.patch ada-musl.patch @@ -254,7 +252,6 @@ prepare() { } build() { - local _dynamic_linker= local _arch_configure= local _libc_configure= local _cross_configure= @@ -264,14 +261,6 @@ build() { cd "$_gccdir" case "$CTARGET" in - x86_64-*-uclibc) _dynamic_linker="--with-dynamic-linker=ld64-uClibc.so.$_uclibc_abiver" ;; - *-uclibc) _dynamic_linker="--with-dynamic-linker=ld-uClibc.so.$_uclibc_abiver" ;; - x86_64-*-gnu) _dynamic_linker="--with-dynamic-linker=ld-linux-x86-64.so.2" ;; - *-gnu) _dynamic_linker="--with-dynamic-linker=ld-linux.so.2" ;; - esac - [ -n "$_dynamic_linker" ] && _dynamic_linker="--with-dynamic-linker-prefix=/lib $_dynamic_linker" - - case "$CTARGET" in armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=cortex-a15 --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux";; armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";; i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";; @@ -320,7 +309,6 @@ build() { echo " CTARGET_ARCH=$CTARGET_ARCH" echo " CTARGET_LIBC=$CTARGET_LIBC" echo " languages=$_languages" - echo " dynamic_linker=$_dynamic_linker" echo " arch_configure=$_arch_configure" echo " libc_configure=$_libc_configure" echo " cross_configure=$_cross_configure" @@ -351,7 +339,6 @@ build() { $_libc_configure \ $_cross_configure \ $_bootstrap_configure \ - $_dynamic_linker \ --with-system-zlib \ || return 1 @@ -660,7 +647,7 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ || return 1 } -md5sums="a3d7d63b9cb6b6ea049469a0c4a43c9d gcc-4.8.2.tar.bz2 +md5sums="7c60f24fab389f77af203d2516ee110f gcc-4.8.3.tar.bz2 d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar 485b2b9da364ad700f25de1c64d9cd06 01_all_gcc48_configure.patch 2a8d6a9046efc9f44449b012cf12d7fd 02_all_gcc48_config.in.patch @@ -687,7 +674,6 @@ a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch ab83248e10b2bf4b3d9240de0fefb52b pt_gnu_eh_frame.patch 6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch 32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch -79d00ee1284fac5192456f7f7d3908aa gcc-4.8-dynamic-linker.patch 87a1725ab79bb98b3a45f7763e889290 gcc-4.8-musl.patch 6e5c32243a86ff35b7b47d18c95b31bd gcc-4.8-musl-fix-iteratephdr.patch 0d0a41c02802b85c8f1b78ce28544f92 gcc-4.8-musl-libssp.patch @@ -702,16 +688,15 @@ e17bbb0fe802974e20645b4182b4c410 fix-gcj-iconv-musl.patch 0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch 4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch 87684048ecaaf0e046983bc2782292dd fix-cxxflags-for-target.patch -750e903d5a53ba32618c2142cdd914e1 ada-no-pie.patch +6959c4f5afdf53a27c254dd3c7c62840 ada-no-pie.patch 2b4235111d2e66f2c690eb340cb4178b ada-fixes.patch -d77c99bf7c03d082a540aaba1193be40 ada-crossbuild.patch 20e2731c02ce50739ebdead2795f9c41 ada-shared.patch 4e47bdae120129462244da0d89a573b3 ada-musl.patch a2f435d81e872a73a8b44a4581832af0 vanilla.specs 17a31b8580de9dd9c06a1ed96886d538 hardenednossp.specs 33ce2d221828a2d03978da52ba609524 hardenednopie.specs 5c431710b72c6ec16ed21bcca83d9f87 hardenednopiessp.specs" -sha256sums="09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8 gcc-4.8.2.tar.bz2 +sha256sums="6a8e4f11b185f4fe2ed9d7fc053e80f8c7e73f800c045f51f9d8bea33f080f1e gcc-4.8.3.tar.bz2 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 ecj-latest.jar 8dee116f723861166cfd137d5cc457e0c11fb2be8b1271e199b41e02bf70a102 01_all_gcc48_configure.patch f301cce95609650f57c5212b38daf5288b4e7c5fa37ae2892664d4c8ceaadfbf 02_all_gcc48_config.in.patch @@ -738,7 +723,6 @@ da6bbb5dc654d5e1df8ecae5c9ebb56265426c405931f14f5878248b8c79f78d 51_all_libiber 78e75cb378bdfe870c98ab3cffef37f54be729d3912979191f27ca00651ad6c4 pt_gnu_eh_frame.patch 53184f842477569973c232dac7c85e71b0018cbe5c4962f95dd9e0273f42083e uclibc-getipinfo.patch 89207a8b62137a857ee2c43499d6b5247d37b530d1338844dbb330a6846b2ad2 gcc-4.6-pr32219.patch -f3863b997acf8fdf5ad1d3626b41a8a0670b896505e9b7afb517916c7599fb1c gcc-4.8-dynamic-linker.patch fffdcf25b71526be739685f927ab0d66c72afff34ec54dc147ba62b262935007 gcc-4.8-musl.patch 151c11c3303233e6ff06e27aa6dc889140bc46a7b5e4870587c40e37d36ede2c gcc-4.8-musl-fix-iteratephdr.patch 80b76ca30dcaf07481ab102869d741f044c7e5235f462182bc27467baacda9a4 gcc-4.8-musl-libssp.patch @@ -753,16 +737,15 @@ d68d6680b3ab996b4b8dde2ddc351cecb46b560dc743d112e682c596696b67bb pr49423.patch bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch a5678380e887dbf600c59273d382e81c10f89d28e422238a617d0a43ad5c5a69 fix-cxxflags-for-target.patch -de3c8606015ebda0dc574f904aa4d23c44c5e261b34dce2ef4d08eed21cb99b9 ada-no-pie.patch +5f43afa2764b22797f8493830bc97817609964d2f5ddeac5706a5d307e0335b0 ada-no-pie.patch ca0db7f59e7af0c621751eee9e3775d4c00c4b663f82f9e04c53a2efb16edca1 ada-fixes.patch -324524490c60d84ef040f79589e0f93fbaeb253dbe031484afaf963b881047e9 ada-crossbuild.patch d6c7fc1820a4fa285297c299c255fe2f19ce1695486f20edd098252a97545e6a ada-shared.patch f20c34f3e0a1bf717f5e22fd66b57c8b69f0411d063203c017ed8209f349e1d4 ada-musl.patch 1315d4c430b4d81c61d14a252d7681125fd7d79fde457c014c18c62c4f1aa1de vanilla.specs 50a46bb1c4d209ce687d13e74cc9e4e0b87cef4a8165d22fb9be243c9cf08374 hardenednossp.specs 8eccfcf282fb54aadede7c23a8b5b843c0a63a55485e74d4332ab49025d38e78 hardenednopie.specs af85685ff501f5e0eaaa394628365425486dafe4780f0f683a4536ab60173cdf hardenednopiessp.specs" -sha512sums="2a3927481707b3bb7171076b596d9b69084edac82460df6fb35395592dd1e8fc5665577702ca746d5b454dec68b1c4e31b9de6adc9865d482f4b8736ec648b10 gcc-4.8.2.tar.bz2 +sha512sums="2b40d231e8445f9c1654137df509f09ce1187b475138ca7f648f710d922a1718f740b2d8a37c26e16b5e27900c60358be98229ae884a6f1f70e9df44ad24d02b gcc-4.8.3.tar.bz2 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e ecj-latest.jar da16931bd0103388991cfc932540a1641ee3b81c10184baefa1e6a90061f0910efedc1118e45eb4a65a34965315d12a3ff2802a2058b31c8f57fa4f3655f8eee 01_all_gcc48_configure.patch 21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch @@ -789,7 +772,6 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2 8464197f01d107872dfa6b47e86e95ae8d75c053527bafbdb7a86bcc7aff4bc5b20a8ec40d6e48d1ad455b0187a3cba9db337cff6c0a6245507c4533e4832d99 pt_gnu_eh_frame.patch e3edf75df1f27af8771bd263e1bd607f6207c4eb5b2a5e11032577deba43ea201825e3b5008a720105f24e49d2821dd77a61c7ceba7ed91b3621c0dbd9292fc6 uclibc-getipinfo.patch 9fc5e32f2573ae67b6cf22119d636d10a47c42718635bceff7d457a93a3f664ae1ed10e154f70964ba2d26b0de04f879a8c05de6411112760d40433373dd0a80 gcc-4.6-pr32219.patch -db84b6582950378116723116be4f277881f7bdd05add216c58c2b86c0fb3a70abeb7798507a74a64b9b949d5b311167bd4df84a048d2d2d32f5836ea1d34c42e gcc-4.8-dynamic-linker.patch 334a474af73a9c43301c1fbe354cfaa97a0a532409f84a8404ca1b18af89319581e8779c0eac04801e9243e382bfc6869a1925335c998998a2a8a031583e6d64 gcc-4.8-musl.patch b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch @@ -804,9 +786,8 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45 abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch -4938a38d6ffebebcd8b07a60e7d300935ef57056e5820145c6668dd5141e272d73a67a1bfe84dafda77212058eee768a03aba4356e52867b40a9ba9216a96714 ada-no-pie.patch +c6aab9de7a3bea6b7e8a2ca66b6f644d716c6eb71b9cbe81aae8ffe76b5b8a380f24e8d42e8e9fece246534534c3c59087671d7d0479da39fc49b6444bbc3d8d ada-no-pie.patch b37195a126476775e2ef16e0adc9173664c514339fb319f628debd8a4133fa53e022278387c68fc260cf813e58602617e9e629ea8177133bfdf5972398fe1c55 ada-fixes.patch -4d411563f6a3ea06bc3a1f4fa77d10250cc275e2496df6039d93f9b2229bc1f5334e484494dbd08881cf046f98aaca8bdddaa6b4a8f947b936d0bdc9e91f2f2b ada-crossbuild.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch 7f6dc922a2c80b1c8c5ed0b6d6e4c1e672984f54bb217f28517929af129892e42c45f7aea4b9c50d8bbc008384b7ae19e1475c79f08b78775709720fe317c8f3 ada-musl.patch 83a0996a48096032bcc674a6d28524f1cd2d81837621ebe4c15b5aedbd551c77ce5576b6307adb673ef0e4ac0431d935ad6a427edca2af5c21b6be9176bfaddb vanilla.specs diff --git a/main/gcc/ada-crossbuild.patch b/main/gcc/ada-crossbuild.patch deleted file mode 100644 index d3d2280cb6..0000000000 --- a/main/gcc/ada-crossbuild.patch +++ /dev/null @@ -1,49 +0,0 @@ -Based on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55946 - ---- gcc-4.8.1/libada/configure.orig -+++ gcc-4.8.1/libada/configure -@@ -2951,9 +2951,7 @@ - - - # Determine what to build for 'gnatlib' --if test $build = $target \ -- && test ${enable_shared} = yes ; then -- # Note that build=target is almost certainly the wrong test; FIXME -+if test ${enable_shared} = yes ; then - default_gnatlib_target="gnatlib-shared" - else - default_gnatlib_target="gnatlib-plain" ---- gcc-4.8.1/gcc/ada/gcc-interface/Make-lang.in.orig -+++ gcc-4.8.1/gcc/ada/gcc-interface/Make-lang.in -@@ -625,7 +625,7 @@ - ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb - -$(MKDIR) ada/doctools - $(CP) $^ ada/doctools -- cd ada/doctools && $(GNATMAKE) -q xgnatugn -+ cd ada/doctools && gnatmake -q xgnatugn - - # Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on - # xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info ---- gcc-4.8.1/gnattools/Makefile.in.orig -+++ gcc-4.8.1/gnattools/Makefile.in -@@ -32,6 +32,8 @@ - # Nonstandard autoconf-set variables. - LN_S=@LN_S@ - target_noncanonical=@target_noncanonical@ -+build=@build@ -+host=@host@ - - # Variables for the user (or the top level) to override. - exeext = @EXEEXT@ -@@ -183,7 +185,11 @@ - # put the host RTS dir first in the PATH to hide the default runtime - # files that are among the sources - # FIXME: This should be done in configure. -+ifeq ($(host), $(build)) - RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) -+else -+RTS_DIR:=$(strip $(subst \,/,$(shell $(host)-gnatls -v | grep adalib ))) -+endif - gnattools-cross: $(GCC_DIR)/stamp-tools - # gnattools1-re - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ diff --git a/main/gcc/ada-no-pie.patch b/main/gcc/ada-no-pie.patch index a38db87196..39cdb85e32 100644 --- a/main/gcc/ada-no-pie.patch +++ b/main/gcc/ada-no-pie.patch @@ -1,5 +1,5 @@ ---- gcc-4.8.1/gcc/ada/gcc-interface/Makefile.in.orig -+++ gcc-4.8.1/gcc/ada/gcc-interface/Makefile.in +--- gcc-4.8.3/gcc/ada/gcc-interface/Makefile.in.orig 2013-12-13 00:53:43.000000000 -0200 ++++ gcc-4.8.3/gcc/ada/gcc-interface/Makefile.in 2014-08-01 11:17:00.186019299 -0300 @@ -2462,23 +2462,23 @@ gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \ gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS) @@ -51,17 +51,16 @@ $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext) # Needs to be built with CC=gcc -@@ -2519,11 +2519,11 @@ +@@ -2519,10 +2519,10 @@ # Likewise for the tools ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS) -- $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \ -+ $(GCC_LINK) $(ALL_CFLAGS) -fno-PIE $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \ - $(TOOLS_LIBS) +- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) ++ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS) -- $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \ -+ $(GCC_LINK) $(ALL_CFLAGS) -fno-PIE $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \ - $(TOOLS_LIBS) +- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) ++ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) ../stamp-gnatlib-$(RTSDIR): + @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \ diff --git a/main/gcc/gcc-4.8-dynamic-linker.patch b/main/gcc/gcc-4.8-dynamic-linker.patch deleted file mode 100644 index d49b85b36e..0000000000 --- a/main/gcc/gcc-4.8-dynamic-linker.patch +++ /dev/null @@ -1,449 +0,0 @@ -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 4b04d64..2fc3b95 100644 ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -987,7 +987,7 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@ - # This is the variable actually used when we compile. If you change this, - # you probably want to update BUILD_CFLAGS in configure.ac - ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ -- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ -+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@ - - # The C++ version. - ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ -@@ -2030,6 +2030,8 @@ DRIVER_DEFINES = \ - -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ - -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ - -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ -+ -DDYNAMIC_LINKER_PREFIX=\"@DYNAMICLINKERPREFIX@\" \ -+ -DDYNAMIC_LINKER=\"@DYNAMICLINKER@\" \ - -DDEFAULT_TARGET_VERSION=\"$(version)\" \ - -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ - -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ -diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index 84e0596..59b9e80 100644 ---- a/gcc/config/alpha/linux-elf.h -+++ b/gcc/config/alpha/linux-elf.h -@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see - #define EXTRA_SPECS \ - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #elif DEFAULT_LIBC == LIBC_GLIBC -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index 4a425c8..0ec2653 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -59,23 +59,8 @@ - #undef SUBTARGET_EXTRA_LINK_SPEC - #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION - --/* GNU/Linux on ARM currently supports three dynamic linkers: -- - ld-linux.so.2 - for the legacy ABI -- - ld-linux.so.3 - for the EABI-derived soft-float ABI -- - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI. -- All the dynamic linkers live in /lib. -- We default to soft-float, but this can be overridden by changing both -- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ -- - #undef GLIBC_DYNAMIC_LINKER --#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" --#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" --#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT -- --#define GLIBC_DYNAMIC_LINKER \ -- "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ -- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ -- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ -diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 488efa4..23c8efb 100644 ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -57,7 +57,7 @@ - - #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ - %{static:-Bstatic} \ -diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h -index 2cd7c51..b0c8531 100644 ---- a/gcc/config/bfin/linux.h -+++ b/gcc/config/bfin/linux.h -@@ -45,7 +45,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - %{shared:-G -Bdynamic} \ - %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -- -dynamic-linker /lib/ld-uClibc.so.0} \ -+ -dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER} \ - %{static}} -init __init -fini __fini" - - #undef TARGET_SUPPORTS_SYNC_CALLS -diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h -index 8d0941c..4ea98a4 100644 ---- a/gcc/config/cris/linux.h -+++ b/gcc/config/cris/linux.h -@@ -102,7 +102,7 @@ along with GCC; see the file COPYING3. If not see - #undef CRIS_DEFAULT_CPU_VERSION - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef CRIS_LINK_SUBTARGET_SPEC - #define CRIS_LINK_SUBTARGET_SPEC \ -diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h -index e46449c..17fae77 100644 ---- a/gcc/config/freebsd-spec.h -+++ b/gcc/config/freebsd-spec.h -@@ -128,9 +128,9 @@ is built with the --enable-threads configure-time option.} \ - #endif - - #if FBSD_MAJOR < 6 --#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" -+#define FBSD_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #else --#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" -+#define FBSD_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #endif - - /* NOTE: The freebsd-spec.h header is included also for various -diff --git a/gcc/config/frv/linux.h b/gcc/config/frv/linux.h -index 2c0d35c..86f653b 100644 ---- a/gcc/config/frv/linux.h -+++ b/gcc/config/frv/linux.h -@@ -34,7 +34,7 @@ - #define ENDFILE_SPEC \ - "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC "\ -diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index 3c95ee0..89cc00c 100644 ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - - #define GNU_USER_LINK_EMULATION "elf_i386" --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index b793e08..e7c41b5 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define GNU_USER_LINK_EMULATION64 "elf_x86_64" - #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKER32 "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h -index bdd6248..3558443 100644 ---- a/gcc/config/ia64/linux.h -+++ b/gcc/config/ia64/linux.h -@@ -55,7 +55,7 @@ do { \ - /* Define this for shared library support because it isn't in the main - linux.h file. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC "\ -diff --git a/gcc/config/knetbsd-gnu.h b/gcc/config/knetbsd-gnu.h -index 75d9e11..bf8409d 100644 ---- a/gcc/config/knetbsd-gnu.h -+++ b/gcc/config/knetbsd-gnu.h -@@ -32,4 +32,5 @@ along with GCC; see the file COPYING3. If not see - - - #undef GNU_USER_DYNAMIC_LINKER --#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+ -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 2be1079..3db010b 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - GLIBC_DYNAMIC_LINKER must be defined for each target using them, or - GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets - supporting both 32-bit and 64-bit compilation. */ --#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKERX32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" -@@ -107,3 +107,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) -+ -+#ifdef NOSTDINC -+#undef STANDARD_INCLUDE_DIR -+#define STANDARD_INCLUDE_DIR 0 -+#endif -diff --git a/gcc/config/m32r/linux.h b/gcc/config/m32r/linux.h -index a6dff08..54fe8e2 100644 ---- a/gcc/config/m32r/linux.h -+++ b/gcc/config/m32r/linux.h -@@ -37,7 +37,7 @@ - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #if TARGET_LITTLE_ENDIAN -diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h -index 6450f3b..09f9d70 100644 ---- a/gcc/config/m68k/linux.h -+++ b/gcc/config/m68k/linux.h -@@ -71,7 +71,7 @@ along with GCC; see the file COPYING3. If not see - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC "-m m68kelf %{shared} \ -diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 9b4c68d..5eab217 100644 ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -17,4 +17,5 @@ You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+ -diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h -index dbba47a..d320d82 100644 ---- a/gcc/config/mips/linux64.h -+++ b/gcc/config/mips/linux64.h -@@ -22,11 +22,11 @@ along with GCC; see the file COPYING3. If not see - #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip" - #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" --#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" --#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" --#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" -+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define BIONIC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ - BIONIC_DYNAMIC_LINKERN32) -diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h -index 16d3047..e03d463 100644 ---- a/gcc/config/mn10300/linux.h -+++ b/gcc/config/mn10300/linux.h -@@ -32,7 +32,7 @@ - #undef ASM_SPEC - #define ASM_SPEC "" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \ -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index dc6f67f..7d5d290 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -360,10 +360,10 @@ extern int dot_symbols; - #undef LINK_OS_DEFAULT_SPEC - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" - #elif DEFAULT_LIBC == LIBC_GLIBC -diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h -index 3b4966a..46df5f6 100644 ---- a/gcc/config/s390/linux.h -+++ b/gcc/config/s390/linux.h -@@ -60,8 +60,8 @@ along with GCC; see the file COPYING3. If not see - #define MULTILIB_DEFAULTS { "m31" } - #endif - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" --#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" -+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC \ -diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h -index 9e8f32d..ad31782 100644 ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" -diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index 49283d3..d068de6 100644 ---- a/gcc/config/sparc/linux.h -+++ b/gcc/config/sparc/linux.h -@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ -diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h -index 7d48e96..07e4112 100644 ---- a/gcc/config/sparc/linux64.h -+++ b/gcc/config/sparc/linux64.h -@@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER -+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #ifdef SPARC_BI_ARCH - -diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h -index 10e22a4..52fa40b 100644 ---- a/gcc/config/xtensa/linux.h -+++ b/gcc/config/xtensa/linux.h -@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3. If not see - %{mlongcalls:--longcalls} \ - %{mno-longcalls:--no-longcalls}" - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER - - #undef LINK_SPEC - #define LINK_SPEC \ -diff --git a/gcc/configure b/gcc/configure -index feb9a5e..a020d8f 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -755,6 +755,9 @@ AWK - SET_MAKE - REPORT_BUGS_TEXI - REPORT_BUGS_TO -+DYNAMICLINKER -+DYNAMICLINKERPREFIX -+NOSTDINC - PKGVERSION - CONFIGURE_SPECS - CROSS_SYSTEM_HEADER_DIR -@@ -1673,6 +1676,17 @@ Optional Packages: - choose the garbage collection mechanism to use with - the compiler - --with-system-zlib use installed libz -+ --with-dynamic-linker=PATH -+ specifies path to dynamic linker. -+ example: "/lib/ld-linux.so.2", where this defines -+ "ld-linux.so.2" -+ --with-dynamic-linker-prefix=PATH -+ specifies path to dynamic linker. -+ example: "/lib/ld-linux.so.2", where this defines -+ "/lib" -+ --with-nostdinc build gcc to ignore standard include directories. -+ You will have to use --with-local-prefix with this -+ option. - --with-linker-hash-style={sysv,gnu,both} - specify the linker hash style - -@@ -6384,6 +6398,47 @@ fi - - - -+# Check whether --with-dynamic-linker was given. -+ -+DYNAMICLINKER="ld-linux.so.2" ; -+if test "${with_dynamic_linker+set}" = set; then -+ withval="$with_dynamic_linker" -+ case "${withval}" in -+yes) { { echo "$as_me:$LINENO: error: bad value "${withval}". Use something like --with-dynamic-linker=$DYNAMICLINKER" >&5 -+echo "$as_me: error: bad value "${withval}". Use something like --with-dynamic-linker=$DYNAMICLINKER" >&2;} -+ { (exit 1); exit 1; }; } ;; -+no) ;; -+*) DYNAMICLINKER=$withval ;; -+esac -+fi; -+ -+# Check whether --with-dynamic-linker-prefix= was given. -+ -+DYNAMICLINKERPREFIX="/lib" ; -+if test "${with_dynamic_linker_prefix+set}" = set; then -+ withval="$with_dynamic_linker_prefix" -+ case "${withval}" in -+yes) { { echo "$as_me:$LINENO: error: bad value "${withval}". Use --with-dynamic-linker-prefix=/path/to/lib/" >&5 -+echo "$as_me: error: bad value "${withval}". Use --with-dynamic-linker-prefix=/path/to/lib/" >&2;} -+ { (exit 1); exit 1; }; } ;; -+no) ;; -+*) DYNAMICLINKERPREFIX=$withval ;; -+esac -+ -+fi; -+ -+# Check whether --with-nostdinc was given. -+ -+if test "${with_nostdinc+set}" = set; then -+ withval="$with_nostdinc" -+ case "${withval}" in -+yes) NOSTDINC="-DNOSTDINC" ;; -+no) ;; -+*) NOSTDINC="-DNOSTDINC" ;; -+esac -+fi; -+ -+ - - # --------------------- - # Warnings and checking |