From 607827292053aa25d0f0300add0798dd085a9131 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 15 Mar 2015 20:46:36 -0400 Subject: compiler building blocks: add support for custom build variables. feature detection: set a fallback value of 'yes' to modern assembler presence, PE dward support, libc-provided stack protector, and dynamic-loader header iteration. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- libssp/Makefile.am | 6 ++++++ libssp/Makefile.in | 10 ++++++++-- libssp/configure | 7 +++++++ libssp/configure.ac | 7 +++++++ 4 files changed, 28 insertions(+), 2 deletions(-) (limited to 'libssp') diff --git a/libssp/Makefile.am b/libssp/Makefile.am index 5a2ecac1f..999f7aa2b 100644 --- a/libssp/Makefile.am +++ b/libssp/Makefile.am @@ -4,6 +4,12 @@ ## Free Software Foundation, Inc. ## + +# Compiler Building Blocks variables +cbb_xgcc_for_specs = @cbb_xgcc_for_specs@ +cbb_ldflags_for_target = @cbb_ldflags_for_target@ + + AUTOMAKE_OPTIONS = 1.9.5 foreign ACLOCAL_AMFLAGS = -I .. -I ../config MAINT_CHARSET = latin1 diff --git a/libssp/Makefile.in b/libssp/Makefile.in index a7db7a9c0..f7c184548 100644 --- a/libssp/Makefile.in +++ b/libssp/Makefile.in @@ -13,6 +13,12 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. + +# Compiler Building Blocks variables +cbb_xgcc_for_specs = @cbb_xgcc_for_specs@ +cbb_ldflags_for_target = @cbb_ldflags_for_target@ + + @SET_MAKE@ @@ -92,7 +98,7 @@ am_libssp_la_OBJECTS = ssp.lo gets-chk.lo memcpy-chk.lo memmove-chk.lo \ libssp_la_OBJECTS = $(am_libssp_la_OBJECTS) libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@ + $(libssp_la_LDFLAGS) $(LDFLAGS) $(cbb_ldflags_for_target) -o $@ am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS) libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -111,7 +117,7 @@ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ + $(LDFLAGS) $(cbb_ldflags_for_target) -o $@ SOURCES = $(libssp_la_SOURCES) $(libssp_nonshared_la_SOURCES) MULTISRCTOP = MULTIBUILDTOP = diff --git a/libssp/configure b/libssp/configure index bd3f5662c..3e827e810 100755 --- a/libssp/configure +++ b/libssp/configure @@ -13422,3 +13422,10 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +# Compiler Building Blocks variables +sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ + -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ + -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ + Makefile || exit 2 + diff --git a/libssp/configure.ac b/libssp/configure.ac index 0eee36ce0..c16aa84f8 100644 --- a/libssp/configure.ac +++ b/libssp/configure.ac @@ -197,3 +197,10 @@ fi AC_CONFIG_FILES([Makefile ssp/ssp.h]) AC_OUTPUT + + +# Compiler Building Blocks variables +sed -i -e 's#@cbb_xgcc_for_specs@#'"$cbb_xgcc_for_specs"'#g' \ + -e 's#@cbb_ldflags_for_target@#'"$cbb_ldflags_for_target"'#g' \ + -e 's#@cbb_sysroot_for_libgcc@#'"$cbb_sysroot_for_libgcc"'#g' \ + Makefile || exit 2 -- cgit v1.2.3