pkgsrc-ng/lang/gcc45/patches/patch-gcc_Makefile.in
Lionel Sambuc 612ad0a18c lang/gcc45
2016-01-22 00:09:29 +01:00

157 lines
5.7 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$NetBSD$
--- gcc/Makefile.in.orig Thu Sep 2 13:05:30 2010
+++ gcc/Makefile.in
@@ -602,6 +602,9 @@ objext = .o
exeext = @host_exeext@
build_exeext = @build_exeext@
+# NetBSD mknative-gcc addition
+ENABLE_SHARED = @enable_shared@
+
# Directory in which to put man pages.
mandir = @mandir@
man1dir = $(mandir)/man1
@@ -727,6 +730,7 @@ LIBCONVERT =
# Control whether header files are installed.
INSTALL_HEADERS=install-headers install-mkheaders
+INSTALL_HEADERS=install-headers
# Control whether Info documentation is built and installed.
BUILD_INFO = @BUILD_INFO@
@@ -766,7 +770,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
# Native linker and preprocessor flags. For x-fragment overrides.
BUILD_LDFLAGS=@BUILD_LDFLAGS@
-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
+BUILD_CPPFLAGS=$(BALL_CPPFLAGS)
# Actual name to use when installing a native compiler.
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
@@ -981,6 +985,7 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLA
# puts -I options in CPPFLAGS, our include files in the srcdir will always
# win against random include files in /usr/include.
ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
+BALL_CPPFLAGS = $(BINCLUDES) $(CPPFLAGS)
# This is the variable to use when using $(COMPILER).
ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
@@ -1042,6 +1047,10 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ \
$(CPPINC) $(GMPINC) $(DECNUMINC) \
$(PPLINC) $(CLOOGINC) $(LIBELFINC)
+BINCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
+ -I$(srcdir)/../include @INCINTL@ \
+ $(CPPINC) $(DECNUMINC) \
+ $(PPLINC) $(CLOOGINC) $(LIBELFINC)
.c.o:
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
@@ -1822,8 +1831,7 @@ libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H
$(MACHMODE_H) $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
$(LIB2ADD_ST) $(LIB2ADDEH) $(srcdir)/emutls.c gcov-iov.h $(SFP_MACHINE)
-libgcc.mvars: config.status Makefile $(LIB2ADD) $(LIB2ADD_ST) specs \
- xgcc$(exeext)
+libgcc.mvars: config.status Makefile
: > tmp-libgcc.mvars
echo LIB1ASMFUNCS = '$(LIB1ASMFUNCS)' >> tmp-libgcc.mvars
echo LIB1ASMSRC = '$(LIB1ASMSRC)' >> tmp-libgcc.mvars
@@ -1880,6 +1888,7 @@ multilib.h: s-mlib; @true
s-mlib: $(srcdir)/genmultilib Makefile
if test @enable_multilib@ = yes \
|| test -n "$(MULTILIB_OSDIRNAMES)"; then \
+ CONFIG_SHELL="$(SHELL)" \
$(SHELL) $(srcdir)/genmultilib \
"$(MULTILIB_OPTIONS)" \
"$(MULTILIB_DIRNAMES)" \
@@ -3820,6 +3829,12 @@ gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
# s-* so that mostlyclean does not force the include directory to
# be rebuilt.
+unwind.h: $(UNWIND_H)
+ -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
+ rm -f include/unwind.h
+ cp $(UNWIND_H) include/unwind.h
+ chmod a+r include/unwind.h
+
# Build the include directories.
stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fixinc_list
# Copy in the headers provided with gcc.
@@ -3829,6 +3844,7 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fi
# The touch command is here to workaround an AIX/Linux NFS bug.
-if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
-if [ -d include-fixed ] ; then true; else mkdir include-fixed; chmod a+rx include-fixed; fi
+ if false; then \
for file in .. $(USER_H); do \
if [ X$$file != X.. ]; then \
realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
@@ -3837,11 +3853,13 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fi
cp $$file include; \
chmod a+r include/$$realfile; \
fi; \
- done
+ done; \
+ fi
rm -f include/unwind.h
cp $(UNWIND_H) include/unwind.h
chmod a+r include/unwind.h
- rm -f include/stdint.h
+ if false; then \
+ rm -f include/stdint.h; \
if [ $(USE_GCC_STDINT) = wrap ]; then \
rm -f include/stdint-gcc.h; \
cp $(srcdir)/ginclude/stdint-gcc.h include/stdint-gcc.h; \
@@ -3851,7 +3869,7 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fi
elif [ $(USE_GCC_STDINT) = provide ]; then \
cp $(srcdir)/ginclude/stdint-gcc.h include/stdint.h; \
chmod a+r include/stdint.h; \
- fi
+ fi; \
set -e; for ml in `cat fixinc_list`; do \
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
@@ -3866,7 +3884,8 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H) fi
rm -f $${fix_dir}/limits.h; \
mv tmp-xlimits.h $${fix_dir}/limits.h; \
chmod a+r $${fix_dir}/limits.h; \
- done
+ done; \
+ fi
# Install the README
rm -f include-fixed/README
cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
@@ -3926,10 +3945,11 @@ s-fixinc_list : $(GCC_PASSES)
# Abort if no system headers available, unless building a crosscompiler.
# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: gsyslimits.h macro_list fixinc_list \
- $(build_objdir)/fixincludes/fixincl \
+ $(build_objdir)/fixincludes/fixincl$(build_exeext) \
$(build_objdir)/fixincludes/fixinc.sh
- rm -rf include-fixed; mkdir include-fixed
- -chmod a+rx include-fixed
+ if false; then \
+ rm -rf include-fixed; mkdir include-fixed; \
+ -chmod a+rx include-fixed; \
if [ -d ../prev-gcc ]; then \
cd ../prev-gcc && \
$(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
@@ -3963,6 +3983,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
fi; \
chmod a+r $${fix_dir}/syslimits.h; \
done; \
+ fi; \
fi
$(STAMP) stmp-fixinc
#
@@ -4389,6 +4410,8 @@ install-info:: doc installdirs \
lang.install-info
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_info:
rm -f $@
if [ -f $< ]; then \
for f in $(<)*; do \