summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/build.mk5
-rw-r--r--mk/vars.mk4
-rw-r--r--package/avahi/Makefile2
-rw-r--r--package/dansguardian/Makefile2
-rw-r--r--package/dmidecode/Makefile2
-rw-r--r--package/fltk/Makefile2
-rw-r--r--package/gcc/Makefile7
-rw-r--r--package/id3lib/Makefile2
-rw-r--r--package/iperf/Makefile2
-rw-r--r--package/mrd6/Makefile2
-rw-r--r--package/net-tools/Makefile2
-rw-r--r--package/nmap/Makefile2
-rw-r--r--package/openssh/Makefile2
-rw-r--r--package/sudo/Makefile2
-rw-r--r--toolchain/Config.in27
-rw-r--r--toolchain/binutils/Makefile14
-rw-r--r--toolchain/gcc/Makefile9
17 files changed, 56 insertions, 32 deletions
diff --git a/mk/build.mk b/mk/build.mk
index af1313206..2573027e7 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -41,8 +41,9 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_PKG_TEST=n \
ADK_PKG_MPDBOX=n \
ADK_PKG_DEVELOPMENT=n \
- ADK_TOOLCHAIN_GCC_USE_SSP=n \
- ADK_TOOLCHAIN_GCC_USE_LTO=n \
+ ADK_TOOLCHAIN_USE_SSP=n \
+ ADK_TOOLCHAIN_USE_LTO=n \
+ ADK_TOOLCHAIN_USE_GOLD=n \
BUSYBOX_IFPLUGD=n \
BUSYBOX_EXTRA_COMPAT=n \
BUSYBOX_FEATURE_IFCONFIG_SLIP=n \
diff --git a/mk/vars.mk b/mk/vars.mk
index 49eb3e7e3..2f2ecc134 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -117,13 +117,13 @@ TARGET_CXXFLAGS+= -static
TARGET_LDFLAGS+= -static
endif
-ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),)
+ifneq ($(ADK_TOOLCHAIN_USE_SSP),)
TARGET_CFLAGS+= -fstack-protector
TARGET_CXXFLAGS+= -fstack-protector
TARGET_LDFLAGS+= -fstack-protector
endif
-ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),)
+ifneq ($(ADK_TOOLCHAIN_USE_LTO),)
TARGET_CFLAGS+= -flto
TARGET_CXXFLAGS+= -flto
TARGET_LDFLAGS+= -flto
diff --git a/package/avahi/Makefile b/package/avahi/Makefile
index bd203e79e..a79afbb20 100644
--- a/package/avahi/Makefile
+++ b/package/avahi/Makefile
@@ -61,7 +61,7 @@ CONFIGURE_ARGS+= --enable-glib \
--with-avahi-user=avahi \
--with-avahi-group=avahi
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
CONFIGURE_ARGS+= --enable-stack-protector
else
CONFIGURE_ARGS+= --disable-stack-protector
diff --git a/package/dansguardian/Makefile b/package/dansguardian/Makefile
index 711bf0edb..fd7142d5f 100644
--- a/package/dansguardian/Makefile
+++ b/package/dansguardian/Makefile
@@ -26,7 +26,7 @@ ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm -lc -lgcc_s
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp
endif
diff --git a/package/dmidecode/Makefile b/package/dmidecode/Makefile
index 8829c91b2..4eb004dc7 100644
--- a/package/dmidecode/Makefile
+++ b/package/dmidecode/Makefile
@@ -18,7 +18,7 @@ $(eval $(call PKG_template,DMIDECODE,dmidecode,$(PKG_VERSION)-${PKG_RELEASE},${P
CONFIG_STYLE:= manual
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/fltk/Makefile b/package/fltk/Makefile
index 00795d0b6..d294570b2 100644
--- a/package/fltk/Makefile
+++ b/package/fltk/Makefile
@@ -30,7 +30,7 @@ ifeq ($(ADK_COMPILE_LIBFLTK_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lgcc_s -lm -lc
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index 76e58d954..24571fb3e 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -39,12 +39,6 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_MIPS64EL),y)
CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_MIPS_ABI)
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_SJLJ),y)
-CONFIGURE_ARGS+= --enable-sjlj-exceptions
-else
-CONFIGURE_ARGS+= --disable-sjlj-exceptions
-endif
-
ifneq ($(ADK_PACKAGE_GXX),)
CONFIGURE_ARGS+= --enable-languages=c,c++
else
@@ -57,7 +51,6 @@ else
CONFIGURE_ARGS+= --enable-target-optspace
endif
-
CONFIGURE_ENV+= have_sys_sdt_h=no
CONFIGURE_ARGS+= --host=$(GNU_TARGET_NAME) \
--target=$(GNU_TARGET_NAME) \
diff --git a/package/id3lib/Makefile b/package/id3lib/Makefile
index 19d678a7a..82f23f375 100644
--- a/package/id3lib/Makefile
+++ b/package/id3lib/Makefile
@@ -28,7 +28,7 @@ ifeq ($(ADK_COMPILE_ID3LIB_WITH_UCLIBCXX),y)
LIBRARIES:=-nodefaultlibs -luClibc++ -lz -lm -lc -lgcc
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -fstack-protector
endif
diff --git a/package/iperf/Makefile b/package/iperf/Makefile
index d867dd210..da2c5f156 100644
--- a/package/iperf/Makefile
+++ b/package/iperf/Makefile
@@ -22,7 +22,7 @@ $(eval $(call PKG_template,IPERF,iperf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPEN
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_CXXFLAGS:= $(filter-out -flto,$(TARGET_CXXFLAGS))
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/mrd6/Makefile b/package/mrd6/Makefile
index 46f7595c5..235fb0809 100644
--- a/package/mrd6/Makefile
+++ b/package/mrd6/Makefile
@@ -26,7 +26,7 @@ ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)
LIBRARIES:=-nodefaultlibs -luClibc++
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
diff --git a/package/net-tools/Makefile b/package/net-tools/Makefile
index e550059a4..a83c0a6e0 100644
--- a/package/net-tools/Makefile
+++ b/package/net-tools/Makefile
@@ -23,7 +23,7 @@ $(eval $(call PKG_template,ARP,arp,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},
CONFIG_STYLE:= manual
INSTALL_STYLE:= manual
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
TARGET_LDFLAGS+= -lssp
endif
diff --git a/package/nmap/Makefile b/package/nmap/Makefile
index 09035c248..cd2e690d7 100644
--- a/package/nmap/Makefile
+++ b/package/nmap/Makefile
@@ -21,7 +21,7 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,NMAP,nmap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
LIBRARIES+=-lssp -lssp_nonshared
endif
diff --git a/package/openssh/Makefile b/package/openssh/Makefile
index 4d0c4e9da..7d80662e2 100644
--- a/package/openssh/Makefile
+++ b/package/openssh/Makefile
@@ -50,7 +50,7 @@ CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/usr/lib/heimdal -Wl,-rpath -Wl,/usr/lib/heimdal
endif
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
CONFIGURE_ARGS+= --with-stackprotect
else
CONFIGURE_ARGS+= --without-stackprotect
diff --git a/package/sudo/Makefile b/package/sudo/Makefile
index 0c3d9562f..ea4bb908c 100644
--- a/package/sudo/Makefile
+++ b/package/sudo/Makefile
@@ -21,7 +21,7 @@ CONFIGURE_ARGS+= --without-pam \
--without-sendmail \
--with-env-editor
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_USE_SSP),y)
CONFIGURE_ARGS+= --enable-hardening
else
CONFIGURE_ARGS+= --disable-hardening
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 54016212a..7eb9cdda7 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -10,26 +10,37 @@ config ADK_TOOLCHAIN_GCC_CXX
boolean
default y
-config ADK_TOOLCHAIN_GCC_SSP
- prompt "Enable Stack Smashing Protection in GCC"
+config ADK_TOOLCHAIN_SSP
+ prompt "Enable Stack Smashing Protection"
boolean
default y
-config ADK_TOOLCHAIN_GCC_USE_SSP
+config ADK_TOOLCHAIN_USE_SSP
prompt "Use SSP for all packages"
boolean
- depends on ADK_TOOLCHAIN_GCC_SSP
+ depends on ADK_TOOLCHAIN_SSP
default n
-config ADK_TOOLCHAIN_GCC_LTO
- prompt "Enable Link Time Optimization in GCC"
+config ADK_TOOLCHAIN_LTO
+ prompt "Enable Link Time Optimization"
boolean
default y
-config ADK_TOOLCHAIN_GCC_USE_LTO
+config ADK_TOOLCHAIN_USE_LTO
prompt "Use Link Time Optimization for all packages"
boolean
- depends on ADK_TOOLCHAIN_GCC_LTO
+ depends on ADK_TOOLCHAIN_LTO
+ default n
+
+config ADK_TOOLCHAIN_GOLD
+ prompt "Enable GOLD as linker"
+ boolean
+ default y
+
+config ADK_TOOLCHAIN_USE_GOLD
+ prompt "Use GOLD as linker for all packages"
+ boolean
+ depends on ADK_TOOLCHAIN_GOLD
default n
endmenu
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 4d34e3566..87cea2987 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -6,12 +6,24 @@ include Makefile.inc
include ../rules.mk
include ${TOPDIR}/mk/buildhlp.mk
-ifeq ($(ADK_TOOLCHAIN_GCC_SSP),y)
+ifeq ($(ADK_TOOLCHAIN_SSP),y)
CONFOPTS+= --enable-libssp
else
CONFOPTS+= --disable-libssp
endif
+ifeq ($(ADK_TOOLCHAIN_LTO),y)
+CONFOPTS+= --enable-lto
+else
+CONFOPTS+= --disable-lto
+endif
+
+ifeq ($(ADK_TOOLCHAIN_GOLD),y)
+CONFOPTS+= --enable-gold
+else
+CONFOPTS+= --disable-gold
+endif
+
ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
CONFOPTS+= --with-arch=armv6
endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 611de97bf..eee524ba3 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -202,11 +202,18 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
# remove duplicate tools, convert hardlinks to symlinks
set -e; \
cd $(TOOLCHAIN_DIR)/usr/$(GNU_TARGET_NAME)/bin; \
- for app in ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip; do \
+ for app in ar as c++ g++ gcc ld ld.gold ld.bfd nm objcopy objdump ranlib strip; do \
ln -sf ../../bin/$(GNU_TARGET_NAME)-$${app} $${app}; \
done;
(cd $(TOOLCHAIN_DIR)/usr/bin && \
ln -sf $(GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc-${PKG_VERSION})
+ifeq ($(ADK_TOOLCHAIN_USE_GOLD),y)
+ (cd $(TOOLCHAIN_DIR)/usr/bin && \
+ ln -sf $(GNU_TARGET_NAME)-ld.gold $(GNU_TARGET_NAME)-ld)
+else
+ (cd $(TOOLCHAIN_DIR)/usr/bin && \
+ ln -sf $(GNU_TARGET_NAME)-ld.bfd $(GNU_TARGET_NAME)-ld)
+endif
cd $(STAGING_TARGET_DIR)/lib && \
ln -sf libstdc++.so.6.0.18 libstdc++.so && \
ln -sf libstdc++.so.6.0.18 libstdc++.so.6