diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2011-08-22 16:54:02 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2011-08-22 16:54:02 +0000 |
commit | e3aa9ebaf76b9076897762e8ec28e7542338c3f9 (patch) | |
tree | 9d2d55b0c248cd5196e2b1e53daa710fc4f00e33 /libiberty/configure.ac | |
parent | eb3e9f604784afbcd4fd641ad913e92b25effd0b (diff) | |
download | gcc-e3aa9ebaf76b9076897762e8ec28e7542338c3f9.tar.gz |
Centralize PICFLAG configuration
config:
* picflag.m4: New file.
gcc:
* configure.ac (GCC_PICFLAG_FOR_TARGET): Call it.
(PICFLAG_FOR_TARGET): Substitute.
* aclocal.m4: Regenerate.
* configure: Regenerate.
gcc/ada:
* gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
(GNATLIBCFLAGS_FOR_C): Replace
TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
(gnatlib-shared-default, gnatlib-shared-dual-win32)
(gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
(gnatlib-sjlj, gnatlib-zcx): Likewise.
libada:
* configure.ac: Include ../config/picflag.m4.
(GCC_PICFLAG): Call it.
Substitute.
* configure: Regenerate.
* Makefile.in (TARGET_LIBGCC2_CFLAGS): Replace by PICFLAG.
(GNATLIBCFLAGS_FOR_C): Replace TARGET_LIBGCC2_CFLAGS by PICFLAG.
(LIBADA_FLAGS_TO_PASS): Pass PICFLAG as PICFLAG_FOR_TARGET.
Don't include $(GCC_DIR)/libgcc.mvars.
libiberty:
* aclocal.m4: Include ../config/picflag.m4.
* configure.ac (GCC_PICFLAG): Call it.
(enable_shared): Clear PICFLAG unless shared.
* configure: Regenerate.
From-SVN: r177967
Diffstat (limited to 'libiberty/configure.ac')
-rw-r--r-- | libiberty/configure.ac | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/libiberty/configure.ac b/libiberty/configure.ac index eebd7e99105..754b66a0619 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -191,6 +191,8 @@ if [[ -n "${frag}" ]]; then frag=${libiberty_topdir}/libiberty/config/$frag fi +GCC_PICFLAG + # If they didn't specify --enable-shared, don't generate shared libs. case "${enable_shared}" in yes) shared=yes ;; @@ -198,27 +200,8 @@ case "${enable_shared}" in "") shared=no ;; *) shared=yes ;; esac -if [[ "${shared}" = "yes" ]]; then - case "${host}" in - *-*-cygwin*) ;; - alpha*-*-linux*) PICFLAG=-fPIC ;; - arm*-*-*) PICFLAG=-fPIC ;; - hppa*-*-*) PICFLAG=-fPIC ;; - i370-*-*) PICFLAG=-fPIC ;; - ia64-*-*) PICFLAG=-fpic ;; - i[[34567]]86-*-* | x86_64-*-*) - PICFLAG=-fpic ;; - m68k-*-*) PICFLAG=-fpic ;; - mips*-*-linux*) PICFLAG=-fPIC ;; - powerpc*-*-aix*) ;; - powerpc*-*-*) PICFLAG=-fPIC ;; - sparc*-*-*) case "${CFLAGS}" in - *-fpic* ) PICFLAG=-fpic ;; - * ) PICFLAG=-fPIC ;; - esac ;; - s390*-*-*) PICFLAG=-fpic ;; - sh*-*-*) PICFLAG=-fPIC ;; - esac +if [[ "${shared}" != "yes" ]]; then + PICFLAG= fi AC_SUBST(PICFLAG) |