summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Smith <alex@alex-smith.me.uk>2012-07-18 15:05:12 +0100
committerAlex Smith <alex@alex-smith.me.uk>2012-07-18 15:06:45 +0100
commit8fe25aaeb47890b45bc3f8f7bb2b50880ab0a86c (patch)
tree3ae50362d2d31cf3ea00f52a8b4196a0ccb88d9c
parent2dc19755ccb92785ba27147115de85bfcc283eaa (diff)
Fixed x86_64 GCC configuration issue resulting in an incorrect crtend.o.btrev43032
Some necessary CFLAGS were not being used when compiling crtbegin.o and crtend.o, resulting in warnings when linking shared objects.
-rw-r--r--gcc/gcc/config.gcc2
-rw-r--r--gcc/gcc/config/i386/t-haiku649
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc
index a296b279ba..02dfbd579c 100644
--- a/gcc/gcc/config.gcc
+++ b/gcc/gcc/config.gcc
@@ -1236,7 +1236,7 @@ i[34567]86-*-haiku*)
extra_parts='crtbegin.o crtend.o'
;;
x86_64-*-haiku*)
- tmake_file='t-haiku i386/t-haiku64 i386/t-crtpic'
+ tmake_file='t-haiku i386/t-haiku64'
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku64.h"
extra_parts='crtbegin.o crtend.o'
;;
diff --git a/gcc/gcc/config/i386/t-haiku64 b/gcc/gcc/config/i386/t-haiku64
index d207663e1f..9c8f8e62e6 100644
--- a/gcc/gcc/config/i386/t-haiku64
+++ b/gcc/gcc/config/i386/t-haiku64
@@ -5,3 +5,12 @@ LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
+
+# The pushl in CTOR initialization interferes with frame pointer elimination.
+# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
+# because then __FRAME_END__ might not be the last thing in .eh_frame
+# section.
+CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
+
+# Compile libgcc2.a with pic.
+TARGET_LIBGCC2_CFLAGS = -fPIC