Skip to content

Commit

Permalink
PR bootstrap/54926
Browse files Browse the repository at this point in the history
	* Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
	* configure.ac: If --with-target-subdir, add -frandom-seed=$@
	to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
	accepts it.
	* Makefile.in: Regenerated.
	* configure: Regenerated.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194412 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
jakub committed Dec 11, 2012
1 parent e197f24 commit a7ebc02
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 10 deletions.
10 changes: 10 additions & 0 deletions libbacktrace/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2012-12-11 Jakub Jelinek <[email protected]>

PR bootstrap/54926
* Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
* configure.ac: If --with-target-subdir, add -frandom-seed=$@
to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
accepts it.
* Makefile.in: Regenerated.
* configure: Regenerated.

2012-12-07 Jakub Jelinek <[email protected]>

PR bootstrap/54926
Expand Down
2 changes: 1 addition & 1 deletion libbacktrace/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../libgcc -I ../gcc/include -I $(MULTIBUILDTOP)../../gcc/include

AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG) -frandom-seed=$@
AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)

noinst_LTLIBRARIES = libbacktrace.la

Expand Down
2 changes: 1 addition & 1 deletion libbacktrace/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config
AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../libgcc -I ../gcc/include -I $(MULTIBUILDTOP)../../gcc/include

AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG) -frandom-seed=$@
AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
noinst_LTLIBRARIES = libbacktrace.la
libbacktrace_la_SOURCES = \
backtrace.h \
Expand Down
39 changes: 35 additions & 4 deletions libbacktrace/configure
Original file line number Diff line number Diff line change
Expand Up @@ -11491,7 +11491,7 @@ fi
EXTRA_FLAGS=
if test -n "${with_target_subdir}"; then
EXTRA_FLAGS=-funwind-tables
EXTRA_FLAGS="-funwind-tables -frandom-seed=\$@"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -funwind-tables option" >&5
$as_echo_n "checking for -funwind-tables option... " >&6; }
Expand Down Expand Up @@ -11521,9 +11521,40 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_c_unwind_tables" >&5
$as_echo "$libbacktrace_cv_c_unwind_tables" >&6; }
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -frandom-seed=string option" >&5
$as_echo_n "checking for -frandom-seed=string option... " >&6; }
if test "${libbacktrace_cv_c_random_seed_string+set}" = set; then :
$as_echo_n "(cached) " >&6
else
CFLAGS_hold="$CFLAGS"
CFLAGS="$CFLAGS -frandom-seed=conftest.lo"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
libbacktrace_cv_c_random_seed_string=yes
else
libbacktrace_cv_c_random_seed_string=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$CFLAGS_hold"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_c_random_seed_string" >&5
$as_echo "$libbacktrace_cv_c_random_seed_string" >&6; }
if test "$libbacktrace_cv_c_random_seed_string" = "yes"; then
EXTRA_FLAGS="$EXTRA_FLAGS -frandom-seed=\$@"
fi
fi
Expand Down
20 changes: 16 additions & 4 deletions libbacktrace/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ AC_SUBST(BACKTRACE_FILE)

EXTRA_FLAGS=
if test -n "${with_target_subdir}"; then
EXTRA_FLAGS=-funwind-tables
EXTRA_FLAGS="-funwind-tables -frandom-seed=\$@"
else
AC_CACHE_CHECK([for -funwind-tables option],
[libbacktrace_cv_c_unwind_tables],
Expand All @@ -109,9 +109,21 @@ else
[libbacktrace_cv_c_unwind_tables=yes],
[libbacktrace_cv_c_unwind_tables=no])
CFLAGS="$CFLAGS_hold"])
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
if test "$libbacktrace_cv_c_unwind_tables" = "yes"; then
EXTRA_FLAGS=-funwind-tables
fi
AC_CACHE_CHECK([for -frandom-seed=string option],
[libbacktrace_cv_c_random_seed_string],
[CFLAGS_hold="$CFLAGS"
CFLAGS="$CFLAGS -frandom-seed=conftest.lo"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [return 0;])],
[libbacktrace_cv_c_random_seed_string=yes],
[libbacktrace_cv_c_random_seed_string=no])
CFLAGS="$CFLAGS_hold"])
if test "$libbacktrace_cv_c_random_seed_string" = "yes"; then
EXTRA_FLAGS="$EXTRA_FLAGS -frandom-seed=\$@"
fi
fi
AC_SUBST(EXTRA_FLAGS)

Expand Down

0 comments on commit a7ebc02

Please sign in to comment.