diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2015-10-05 17:36:30 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-10-06 23:40:19 +0200 |
commit | 133509fa406e0e8d4d0f0632e2ee8c5e32dcb010 (patch) | |
tree | fd35007eb121d163d77052cb1bf69c79a0ef50c4 | |
parent | 22843755fa0b6870162660105c6fbbd1ba078390 (diff) | |
download | elfutils-133509fa406e0e8d4d0f0632e2ee8c5e32dcb010.tar.gz |
Use -fPIC instead of -fpic when generating PIC code.
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>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | config/ChangeLog | 5 | ||||
-rw-r--r-- | config/eu.am | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/ChangeLog | 5 | ||||
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | libcpu/ChangeLog | 5 | ||||
-rw-r--r-- | libcpu/Makefile.am | 2 | ||||
-rw-r--r-- | libdw/ChangeLog | 5 | ||||
-rw-r--r-- | libdw/Makefile.am | 2 | ||||
-rw-r--r-- | libebl/ChangeLog | 5 | ||||
-rw-r--r-- | libebl/Makefile.am | 2 |
12 files changed, 37 insertions, 7 deletions
@@ -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 diff --git a/config/ChangeLog b/config/ChangeLog index 067af115..1037b080 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -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. diff --git a/config/eu.am b/config/eu.am index 441b68dd..1368ae53 100644 --- a/config/eu.am +++ b/config/eu.am @@ -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 diff --git a/configure.ac b/configure.ac index 9c47a688..fe2795e3 100644 --- a/configure.ac +++ b/configure.ac @@ -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> diff --git a/lib/ChangeLog b/lib/ChangeLog index d1bdc7bc..76b5753d 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -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. diff --git a/lib/Makefile.am b/lib/Makefile.am index 97f295eb..2219eaa4 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index a20f4407..88ce6616 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -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. diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 3beccf34..0aff4742 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -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=) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 5a026d87..8f3e401d 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -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. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 2299b2fa..1264035b 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -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 diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 4ea6d498..d040c08f 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -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. diff --git a/libebl/Makefile.am b/libebl/Makefile.am index ec4477b7..6b41a3e1 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -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@ |