aboutsummaryrefslogtreecommitdiff
path: root/config/picflag.m4
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2015-06-24 21:43:02 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2015-06-24 21:43:02 +0200
commitf91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca (patch)
tree2cf0506c54b3ed4693dc47cb502088ed5c27a09f /config/picflag.m4
parent59cab532835904f368b0aa99267afba5fda5ded2 (diff)
downloadgdb-f91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca.zip
gdb-f91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca.tar.gz
gdb-f91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca.tar.bz2
Sync libiberty from GCC, replaying updates to configure scripts
Diffstat (limited to 'config/picflag.m4')
-rw-r--r--config/picflag.m412
1 files changed, 9 insertions, 3 deletions
diff --git a/config/picflag.m4 b/config/picflag.m4
index 3bcdbf1..2f5b972 100644
--- a/config/picflag.m4
+++ b/config/picflag.m4
@@ -7,9 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [
case "${$2}" in
# PIC is the default on some targets or must not be used.
*-*-darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- $1=-fno-common
+ # For darwin, common symbols are not allowed in MH_DYLIB files
+ case "${CFLAGS}" in
+ # If we are using a compiler supporting mdynamic-no-pic
+ # and the option has been tested as safe to add, then cancel
+ # it here, since the code generated is incompatible with shared
+ # libs.
+ *-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;;
+ *) $1=-fno-common ;;
+ esac
;;
alpha*-dec-osf5*)
# PIC is the default.