aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2006-01-12 00:17:38 +0000
committerBenjamin Kosnik <bkoz@redhat.com>2006-01-12 00:17:38 +0000
commit1ce22d4a0b82f4ea19d5c47da3c5c4dde709cdd4 (patch)
tree9db6d28a1313c7946304f0fd8536ac7cbacfecd1 /libstdc++-v3
parent8b7260253b49fa7e3400347d3549a0f6744bae81 (diff)
2006-01-11 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4: Use -Wl,-z,relro if possible. * configure: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@109618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/acinclude.m415
-rwxr-xr-xlibstdc++-v3/configure150
3 files changed, 169 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9f5713e7d37..a1e662c7c32 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4: Use -Wl,-z,relro if possible.
+ * configure: Regenerate.
+
2006-01-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/complex: New file, hosts the additions to header
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 716dab55790..6c84ca7381f 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -187,7 +187,7 @@ dnl safe (like an empty string).
dnl
dnl Defines:
dnl SECTION_LDFLAGS='-Wl,--gc-sections' if possible
-dnl OPT_LDFLAGS='-Wl,-O1' if possible
+dnl OPT_LDFLAGS='-Wl,-O1' and '-z,relro' if possible
dnl LD (as a side effect of testing)
dnl Sets:
dnl with_gnu_ld
@@ -267,6 +267,19 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
AC_MSG_RESULT($ac_sectionLDflags)
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ AC_MSG_CHECKING([for ld that supports -Wl,-z,relro])
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ AC_MSG_RESULT($ac_ld_relro)
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index b5fbb5bbc76..bcd04af75e6 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -8279,6 +8279,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -53103,6 +53118,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -74420,6 +74450,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -75900,6 +75945,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -77256,6 +77316,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -79399,6 +79474,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -80708,6 +80798,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -82066,6 +82171,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -83804,6 +83924,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
@@ -85875,6 +86010,21 @@ fi
echo "${ECHO_T}$ac_sectionLDflags" >&6
fi
+ # Set -z,relro.
+ # Note this is only for shared objects
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
# Set linker optimization flags.
if test x"$with_gnu_ld" = x"yes"; then
OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"