components/gcc49/patches/025-libgcc-Makefile.in.patch
changeset 5205 eaff9ab86216
equal deleted inserted replaced
5204:766639d560b9 5205:eaff9ab86216
       
     1 # Stefan Teleman <[email protected]>
       
     2 # Make sure libgcc_s.so.1 is built correctly, and with the
       
     3 # right compiler flags. Namely LARGEFILE and EXTENSIONS.
       
     4 # Internal patch. Not submitted upstream yet.
       
     5 --- libgcc/Makefile.in	2014-01-08 08:37:08.000000000 -0800
       
     6 +++ libgcc/Makefile.in	2015-08-09 21:01:50.367886911 -0700
       
     7 @@ -46,6 +46,9 @@
       
     8  host_noncanonical = @host_noncanonical@
       
     9  target_noncanonical = @target_noncanonical@
       
    10  
       
    11 +# Who are we?
       
    12 +HOSTOS = $(shell uname -s)
       
    13 +
       
    14  # List of extra object files that should be compiled for this target machine.
       
    15  # The rules for compiling them should be in the t-* file for the machine.
       
    16  EXTRA_PARTS = @extra_parts@
       
    17 @@ -73,17 +76,24 @@
       
    18  
       
    19  CC = @CC@
       
    20  CFLAGS = @CFLAGS@
       
    21 +CPPFLAGS = @CPPFLAGS@
       
    22  RANLIB = @RANLIB@
       
    23  LN_S = @LN_S@
       
    24  
       
    25  PWD_COMMAND = $${PWDCMD-pwd}
       
    26  
       
    27 +ifeq ($(HOSTOS),SunOS)
       
    28 +  CPPFLAGS += -D_REENTRANT=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
       
    29 +  CPPFLAGS += -D__EXTENSIONS__=1
       
    30 +endif
       
    31 +
       
    32  # Flags to pass to a recursive make.
       
    33  FLAGS_TO_PASS = \
       
    34  	"AR=$(AR)" \
       
    35  	"AR_FLAGS=$(AR_FLAGS)" \
       
    36  	"CC=$(CC)" \
       
    37  	"CFLAGS=$(CFLAGS)" \
       
    38 +	"CPPFLAGS=$(CPPFLAGS)" \
       
    39  	"DESTDIR=$(DESTDIR)" \
       
    40  	"EXTRA_OFILES=$(EXTRA_OFILES)" \
       
    41  	"HDEFINES=$(HDEFINES)" \
       
    42 @@ -296,7 +306,7 @@
       
    43  inst_libdir = $(libsubdir)$(MULTISUBDIR)
       
    44  inst_slibdir = $(slibdir)$(MULTIOSSUBDIR)
       
    45  
       
    46 -gcc_compile_bare = $(CC) $(INTERNAL_CFLAGS)
       
    47 +gcc_compile_bare = $(CC) $(CPPFLAGS) $(INTERNAL_CFLAGS)
       
    48  compile_deps = -MT $@ -MD -MP -MF $(basename $@).dep
       
    49  gcc_compile = $(gcc_compile_bare) -o $@ $(compile_deps)
       
    50  gcc_s_compile = $(gcc_compile) -DSHARED
       
    51 @@ -962,7 +972,7 @@
       
    52  endif
       
    53  
       
    54  # Build the standard GCC startfiles and endfiles.
       
    55 -ALL_CRT_CFLAGS = $(CFLAGS) $(CRTSTUFF_CFLAGS) $(INCLUDES)
       
    56 +ALL_CRT_CFLAGS = $(CFLAGS) $(CPPFLAGS) $(CRTSTUFF_CFLAGS) $(INCLUDES)
       
    57  crt_compile = $(CC) $(ALL_CRT_CFLAGS) -o $@ $(compile_deps)
       
    58  
       
    59  ifeq ($(CUSTOM_CRTSTUFF),)