diff options
author | unknown <acurtis@xiphis.org> | 2006-06-28 09:54:40 -0700 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2006-06-28 09:54:40 -0700 |
commit | 76d0badd895c7a1a56ccf68b16bf944f93bd9870 (patch) | |
tree | ce9c2a45a95b57ab64b04f05a47f6c0b411a1d5d | |
parent | 2f45384bf1eb48b9fab73bf413ceb2dc557f29b7 (diff) | |
parent | edcba74415fc7a2ead3d65628d22efab598a61b8 (diff) | |
download | mariadb-git-76d0badd895c7a1a56ccf68b16bf944f93bd9870.tar.gz |
Merge xiphis.org:/home/antony/work2/p4-bug12096.2
into xiphis.org:/home/antony/work2/p4-bug12096.2-merge
configure.in:
Auto merged
sql/mysqld.cc:
Auto merged
-rw-r--r-- | config/ac-macros/compiler_flag.m4 | 22 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | strings/Makefile.am | 6 |
3 files changed, 26 insertions, 6 deletions
diff --git a/config/ac-macros/compiler_flag.m4 b/config/ac-macros/compiler_flag.m4 index a236f61a198..88097c7a62e 100644 --- a/config/ac-macros/compiler_flag.m4 +++ b/config/ac-macros/compiler_flag.m4 @@ -38,3 +38,25 @@ AC_DEFUN([AC_SYS_OS_COMPILER_FLAG], fi ]) +AC_DEFUN([AC_CHECK_NOEXECSTACK], +[ + AC_CACHE_CHECK(whether --noexecstack is desirable for .S files, + mysql_cv_as_noexecstack, [dnl + cat > conftest.c <<EOF +void foo (void) { } +EOF + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS + -S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \ + && grep .note.GNU-stack conftest.s >/dev/null \ + && AC_TRY_COMMAND([${CC-cc} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack + -c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD]) + then + mysql_cv_as_noexecstack=yes + else + mysql_cv_as_noexecstack=no + fi + rm -f conftest*]) + if test $mysql_cv_as_noexecstack = yes; then + CCASFLAGS="$CCASFLAGS -Wa,--noexecstack" + fi +]) diff --git a/configure.in b/configure.in index fd2cf3baf97..fe111b8a671 100644 --- a/configure.in +++ b/configure.in @@ -515,6 +515,10 @@ AM_PROG_CC_STDC # We need an assembler, too AM_PROG_AS +CCASFLAGS="$CCASFLAGS $ASFLAGS" + +# Check if we need noexec stack for assembler +AC_CHECK_NOEXECSTACK if test "$am_cv_prog_cc_stdc" = "no" then diff --git a/strings/Makefile.am b/strings/Makefile.am index c43cf0f290a..7ee115c09e5 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -66,12 +66,6 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@ #strtoull.o: @CHARSET_OBJS@ -if ASSEMBLER -# On Linux gcc can compile the assembly files -%.o : %.s - $(AS) $(ASFLAGS) -o $@ $< -endif - FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ str_test: str_test.c $(pkglib_LIBRARIES) |