]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Use -fPIC instead of -fpic when generating PIC code.
authorJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 5 Oct 2015 15:36:30 +0000 (17:36 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 6 Oct 2015 21:40:19 +0000 (23:40 +0200)
This avoids relocation overflows in sparc/sparc64 targets while
linking,  where the reachable data using -fpic is only 4kb.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
12 files changed:
ChangeLog
config/ChangeLog
config/eu.am
configure.ac
lib/ChangeLog
lib/Makefile.am
libcpu/ChangeLog
libcpu/Makefile.am
libdw/ChangeLog
libdw/Makefile.am
libebl/ChangeLog
libebl/Makefile.am

index afa5905aff0e2ef2fed9bcdc58646620759f400c..b7e69e091e49395b751fa626605f1d4c9e987755 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * configure.ac: Use -fPIC instead of -fpic to avoid relocation
+       overflows in some platforms.
+
 2015-07-11  Pino Toscano  <toscano.pino@tiscali.it>
 
        * .gitignore: Add more generated files, and anchor some of the
index 067af115b6d4fd0a26c4ed90ec72cc5adfa279f2..1037b08017dfdd8481374eac1a180387ca8fcbc6 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * eu.am (%.os): Use -fPIC instead of -fpic to avoid relocation
+       overflows in some platforms.
+
 2015-09-22  Mark Wielaard  <mjw@redhat.com>
 
        * eu.am (AM_CFLAGS): Add -Wold-style-definition -Wstrict-prototypes.
index 441b68dde86713bb494dd8d77cf2849a859b8c95..1368ae533bdf99236d5b080e19612d27a89eb530 100644 (file)
@@ -55,14 +55,14 @@ endif
 
 %.os: %.c %.o
 if AMDEP
-       if $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) -MT $@ -MD -MP \
+       if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \
          -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
        then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
             rm -f "$(DEPDIR)/$*.Tpo"; \
        else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
        fi
 else
-       $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) $<
+       $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $<
 endif
 
 CLEANFILES = *.gcno *.gcda
index 9c47a688473a376fe6d62dac5ea5a0e528da5f7a..fe2795e36dcdfe832e0378048b01e13dcb742fe0 100644 (file)
@@ -111,7 +111,7 @@ AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
 # Some old compiler/linker/libc combinations fail some ways and not others.
 save_CFLAGS="$CFLAGS"
 save_LDFLAGS="$LDFLAGS"
-CFLAGS="-fpic $CFLAGS"
+CFLAGS="-fPIC $CFLAGS"
 LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS"
 AC_LINK_IFELSE([dnl
 AC_LANG_PROGRAM([[#include <stdlib.h>
index d1bdc7bcf54f812b324023ca87c3579a36df8be8..76b5753d71ccd8fa3b918737e2c03e5b8b0f5f7c 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid relocation
+       overflows in some platforms.
+
 2015-09-22  Mark Wielaard  <mjw@redhat.com>
 
        * dynamicsizehash.c: Remove old-style function definitions.
index 97f295eb7e3b1017b599a70d0a54db3b85863c67..2219eaa4eb7b66fabdd065266c60a6b5530b9f74 100644 (file)
@@ -28,7 +28,7 @@
 ## not, see <http://www.gnu.org/licenses/>.
 ##
 include $(top_srcdir)/config/eu.am
-AM_CFLAGS += -fpic
+AM_CFLAGS += -fPIC
 AM_CPPFLAGS += -I$(srcdir)/../libelf
 
 noinst_LIBRARIES = libeu.a
index a20f4407147672e0fb1f9878581de0091bf0d091..88ce6616e4616438ec97d0008beb927a0c84b242 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-29  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
+       relocation overflows in some platforms.
+
 2014-04-13  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am (i386_gendis_LDADD): Remove libmudflap.
index 3beccf349c52e3755461d41c83ae59c58adb7d64..0aff4742d60ebf7e651d355c7c77367aca0e68e0 100644 (file)
@@ -30,7 +30,7 @@
 include $(top_srcdir)/config/eu.am
 AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
            -I$(srcdir)/../libdw -I$(srcdir)/../libasm
-AM_CFLAGS += -fpic -fdollars-in-identifiers
+AM_CFLAGS += -fPIC -fdollars-in-identifiers
 LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=)
 LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
 AM_YFLAGS = -p$(<F:parse.y=)
index 5a026d879ee4112e69dd6f3025707b59eba5c601..8f3e401da61622d64a140d6ae52c455e68df4299 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
+       relocation overflows in some platforms.
+
 2015-09-23  Mark Wielaard  <mjw@redhat.com>
 
        * dwarf_error.c (__libdw_seterrno): Mark as internal_function.
index 2299b2fabd4739b9cade96e9dfb1b948d8ed0a57..1264035be78d829cebdc5737c0fc0a8ef8150e52 100644 (file)
@@ -29,7 +29,7 @@
 ##
 include $(top_srcdir)/config/eu.am
 if BUILD_STATIC
-AM_CFLAGS += -fpic
+AM_CFLAGS += -fPIC
 endif
 AM_CPPFLAGS += -I$(srcdir)/../libelf
 VERSION = 1
index 4ea6d498888b62ea4aaa72c0b78bbbaeae3c7aa5..d040c08fe17ac0fa32d5644452812eea297704ae 100644 (file)
@@ -1,3 +1,8 @@
+2015-09-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
+       relocation overflows in some platforms.
+
 2015-09-22  Mark Wielaard  <mjw@redhat.com>
 
        * *.c: Remove old-style function definitions.
index ec4477b7b117914c13bd83f94ad9092bed969ff1..6b41a3e1c701d028d29d97d1d120517876f82de1 100644 (file)
@@ -28,7 +28,7 @@
 ## not, see <http://www.gnu.org/licenses/>.
 ##
 include $(top_srcdir)/config/eu.am
-AM_CFLAGS += -fpic
+AM_CFLAGS += -fPIC
 AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm
 VERSION = 1
 LIBEBL_SUBDIR = @LIBEBL_SUBDIR@