From 2d1efe2d2d19872257bffb1561838805eb5f4fab Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 13 Jul 2011 09:57:08 +0000 Subject: [PATCH] Makefile.in (CRT0STUFF_T_CFLAGS): Remove. gcc: * Makefile.in (CRT0STUFF_T_CFLAGS): Remove. ($(T)crt0.o, $(T)mcrt0.o, s-crt0): Remove. * config/i386/netware-crt0.c: Move to ../libgcc/config/i386. * config/i386/t-nwld (CRTSTUFF_T_CFLAGS, CRT0STUFF_T_CFLAGS): Remove. (CRT0_S, MCRT0_S): Remove. ($(T)libgcc.def, $(T)libc.def, $(T)libcpre.def, $(T)posixpre.def): Remove. (s-crt0): Remove. * config.gcc (i[3456x]86-*-netware*): Remove extra_parts. libgcc: * config/i386/netware-crt0.c: New file. * config/i386/t-nwld: Rename to ... * config/i386/t-slibgcc-nwld: ... this. * config/i386/t-nwld: New file. * config.host (i[3456x]86-*-netware*): Add i386/t-slibgcc-nwld to tmake_file. Add crt0.o, libgcc.def, libc.def, libcpre.def, posixpre.def to extra_parts. From-SVN: r176225 --- gcc/ChangeLog | 12 ++++ gcc/Makefile.in | 15 ----- gcc/config.gcc | 1 - gcc/config/i386/t-nwld | 27 +-------- libgcc/ChangeLog | 11 ++++ libgcc/config.host | 3 +- {gcc => libgcc}/config/i386/netware-crt0.c | 0 libgcc/config/i386/t-nwld | 64 ++++++++++++---------- libgcc/config/i386/t-slibgcc-nwld | 31 +++++++++++ 9 files changed, 93 insertions(+), 71 deletions(-) rename {gcc => libgcc}/config/i386/netware-crt0.c (100%) create mode 100644 libgcc/config/i386/t-slibgcc-nwld diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c21c70ba761..6b83a43b016 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-07-13 Rainer Orth + + * Makefile.in (CRT0STUFF_T_CFLAGS): Remove. + ($(T)crt0.o, $(T)mcrt0.o, s-crt0): Remove. + * config/i386/netware-crt0.c: Move to ../libgcc/config/i386. + * config/i386/t-nwld (CRTSTUFF_T_CFLAGS, CRT0STUFF_T_CFLAGS): Remove. + (CRT0_S, MCRT0_S): Remove. + ($(T)libgcc.def, $(T)libc.def, $(T)libcpre.def, $(T)posixpre.def): + Remove. + (s-crt0): Remove. + * config.gcc (i[3456x]86-*-netware*): Remove extra_parts. + 2011-07-12 Eric Botcazou * cse.c (insert_with_costs): Put semi-colon after empty loop body diff --git a/gcc/Makefile.in b/gcc/Makefile.in index caef28c822f..fcc8b7e203c 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -813,9 +813,6 @@ RUNTESTFLAGS = # Extra flags to use when compiling crt{begin,end}.o. CRTSTUFF_T_CFLAGS = -# Extra flags to use when compiling [m]crt0.o. -CRT0STUFF_T_CFLAGS = - # "t" or nothing, for building multilibbed versions of, say, crtbegin.o. T = @@ -1995,18 +1992,6 @@ $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ -o $(T)crtbeginT$(objext) - -# Compile the start modules crt0.o and mcrt0.o that are linked with -# every program -$(T)crt0.o: s-crt0 ; @true -$(T)mcrt0.o: s-crt0; @true - -s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ - -o $(T)crt0.o -c $(CRT0_S) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ - -o $(T)mcrt0.o -c $(MCRT0_S) - $(STAMP) s-crt0 # # Compiling object files from source files. diff --git a/gcc/config.gcc b/gcc/config.gcc index 7343ef53032..c9dab55c63d 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1370,7 +1370,6 @@ i[3456x]86-*-netware*) extra_objs="$extra_objs nwld.o" tm_file="${tm_file} i386/nwld.h" tmake_file="${tmake_file} i386/t-nwld t-slibgcc-dummy" - extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def" ;; esac case x${enable_threads} in diff --git a/gcc/config/i386/t-nwld b/gcc/config/i386/t-nwld index a468533c1d1..ecd1a3bfccc 100644 --- a/gcc/config/i386/t-nwld +++ b/gcc/config/i386/t-nwld @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 # Free Software Foundation, Inc. # # This file is part of GCC. @@ -17,31 +17,6 @@ # along with GCC; see the file COPYING3. If not see # . -CRTSTUFF_T_CFLAGS = -mpreferred-stack-boundary=2 -CRT0STUFF_T_CFLAGS = -mpreferred-stack-boundary=2 $(INCLUDES) -# this is a slight misuse (it's not an assembler file) -CRT0_S = $(srcdir)/config/i386/netware-crt0.c -MCRT0_S = $(srcdir)/config/i386/netware-crt0.c - -$(T)libgcc.def: $(srcdir)/config/i386/t-nwld - echo "module libgcc_s" >$@ - -$(T)libc.def: $(srcdir)/config/i386/t-nwld - echo "module libc" >$@ - -$(T)libcpre.def: $(srcdir)/config/i386/t-nwld - echo "start _LibCPrelude" >$@ - echo "exit _LibCPostlude" >>$@ - echo "check _LibCCheckUnload" >>$@ - -$(T)posixpre.def: $(srcdir)/config/i386/t-nwld - echo "start POSIX_Start" >$@ - echo "exit POSIX_Stop" >>$@ - echo "check POSIX_CheckUnload" >>$@ - nwld.o: $(srcdir)/config/i386/nwld.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(TM_P_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/i386/nwld.c - - -s-crt0: $(srcdir)/unwind-dw2-fde.h diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 0221e751919..c358ae4126a 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2011-07-13 Rainer Orth + + * config/i386/netware-crt0.c: New file. + * config/i386/t-nwld: Rename to ... + * config/i386/t-slibgcc-nwld: ... this. + * config/i386/t-nwld: New file. + * config.host (i[3456x]86-*-netware*): Add i386/t-slibgcc-nwld to + tmake_file. + Add crt0.o, libgcc.def, libc.def, libcpre.def, posixpre.def to + extra_parts. + 2011-07-11 Rainer Orth * configure.ac (i?86-*-solaris2*): Use libgcc copy of diff --git a/libgcc/config.host b/libgcc/config.host index 55f8a510766..6b6caffde95 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -369,7 +369,8 @@ i[34567]86-*-lynxos*) i[3456x]86-*-netware*) case /${with_ld} in */nwld) - tmake_file="${tmake_file} i386/t-nwld" + tmake_file="${tmake_file} i386/t-nwld i386/t-slibgcc-nwld" + extra_parts="${extra_parts} crt0.o libgcc.def libc.def libcpre.def posixpre.def" ;; esac ;; diff --git a/gcc/config/i386/netware-crt0.c b/libgcc/config/i386/netware-crt0.c similarity index 100% rename from gcc/config/i386/netware-crt0.c rename to libgcc/config/i386/netware-crt0.c diff --git a/libgcc/config/i386/t-nwld b/libgcc/config/i386/t-nwld index 408587273da..d08e2827f65 100644 --- a/libgcc/config/i386/t-nwld +++ b/libgcc/config/i386/t-nwld @@ -1,31 +1,39 @@ -# Build a shared libgcc library for NetWare. +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 +# Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . -SHLIB_EXT = .nlm -SHLIB_NAME = @shlib_base_name@.nlm -SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ -SHLIB_DEF = $(gcc_srcdir)/config/i386/netware-libgcc.def -SHLIB_MAP = $(gcc_srcdir)/config/i386/netware-libgcc.exp -SHLIB_SRC = $(gcc_srcdir)/config/i386/netware-libgcc.c +crt0.o: $(srcdir)/config/i386/netware-crt0.c + $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -SHLIB_LINK = set -e; \ - cat $(SHLIB_DEF) >@shlib_base_name@.def; \ - echo "name $(SHLIB_NAME)" >>@shlib_base_name@.def; \ - echo "version $(version)" | sed "s!\.!,!g" >>@shlib_base_name@.def; \ - touch build; \ - echo "build $$(expr $$(>@shlib_base_name@.def; \ - echo "export @$(SHLIB_MAP)" >>@shlib_base_name@.def; \ - if mpkxdc -n -p @shlib_base_name@.xdc; \ - then echo "xdcdata @shlib_base_name@.xdc" >>@shlib_base_name@.def; \ - else echo "WARNING: $(SHLIB_NAME) built without XDC data will not work well." 1>&2; \ - fi; \ - $(CC) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME) \ - $(SHLIB_SRC) -posix -static-libgcc -lnetware \ - -Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_base_name@.def; \ - rm -f @shlib_base_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_base_name@.imp; \ - rm -f libgcc.imp; $(LN_S) @shlib_base_name@.imp libgcc.imp; \ - expr $$(build +CRTSTUFF_T_CFLAGS = -mpreferred-stack-boundary=2 -SHLIB_INSTALL = \ - $(SHELL) $(srcdir)/mkinstalldirs $(slibdir)$(SHLIB_SLIBDIR_QUAL); \ - $(INSTALL_DATA) $(SHLIB_NAME) $(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \ - $(INSTALL_DATA) @shlib_base_name@.imp $(DESTDIR)$(libsubdir)/ +libgcc.def: $(srcdir)/config/i386/t-nwld + echo "module libgcc_s" >$@ + +libc.def: $(srcdir)/config/i386/t-nwld + echo "module libc" >$@ + +libcpre.def: $(srcdir)/config/i386/t-nwld + echo "start _LibCPrelude" >$@ + echo "exit _LibCPostlude" >>$@ + echo "check _LibCCheckUnload" >>$@ + +posixpre.def: $(srcdir)/config/i386/t-nwld + echo "start POSIX_Start" >$@ + echo "exit POSIX_Stop" >>$@ + echo "check POSIX_CheckUnload" >>$@ diff --git a/libgcc/config/i386/t-slibgcc-nwld b/libgcc/config/i386/t-slibgcc-nwld new file mode 100644 index 00000000000..408587273da --- /dev/null +++ b/libgcc/config/i386/t-slibgcc-nwld @@ -0,0 +1,31 @@ +# Build a shared libgcc library for NetWare. + +SHLIB_EXT = .nlm +SHLIB_NAME = @shlib_base_name@.nlm +SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +SHLIB_DEF = $(gcc_srcdir)/config/i386/netware-libgcc.def +SHLIB_MAP = $(gcc_srcdir)/config/i386/netware-libgcc.exp +SHLIB_SRC = $(gcc_srcdir)/config/i386/netware-libgcc.c + +SHLIB_LINK = set -e; \ + cat $(SHLIB_DEF) >@shlib_base_name@.def; \ + echo "name $(SHLIB_NAME)" >>@shlib_base_name@.def; \ + echo "version $(version)" | sed "s!\.!,!g" >>@shlib_base_name@.def; \ + touch build; \ + echo "build $$(expr $$(>@shlib_base_name@.def; \ + echo "export @$(SHLIB_MAP)" >>@shlib_base_name@.def; \ + if mpkxdc -n -p @shlib_base_name@.xdc; \ + then echo "xdcdata @shlib_base_name@.xdc" >>@shlib_base_name@.def; \ + else echo "WARNING: $(SHLIB_NAME) built without XDC data will not work well." 1>&2; \ + fi; \ + $(CC) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME) \ + $(SHLIB_SRC) -posix -static-libgcc -lnetware \ + -Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_base_name@.def; \ + rm -f @shlib_base_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_base_name@.imp; \ + rm -f libgcc.imp; $(LN_S) @shlib_base_name@.imp libgcc.imp; \ + expr $$(build + +SHLIB_INSTALL = \ + $(SHELL) $(srcdir)/mkinstalldirs $(slibdir)$(SHLIB_SLIBDIR_QUAL); \ + $(INSTALL_DATA) $(SHLIB_NAME) $(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \ + $(INSTALL_DATA) @shlib_base_name@.imp $(DESTDIR)$(libsubdir)/ -- 2.30.2