1 CRTSTUFF_T_CFLAGS = -mpreferred-stack-boundary=2
2 CRT0STUFF_T_CFLAGS = -mpreferred-stack-boundary=2 $(INCLUDES)
3 # this is a slight misuse (it's not an assembler file)
4 CRT0_S = $(srcdir)/config/i386/netware-crt0.c
5 MCRT0_S = $(srcdir)/config/i386/netware-crt0.c
7 libgcc.def: $(srcdir)/config/i386/t-nwld
8 echo "module libgcc_s" >$@
10 libc.def: $(srcdir)/config/i386/t-nwld
11 echo "module libc" >$@
13 libcpre.def: $(srcdir)/config/i386/t-nwld
14 echo "start _LibCPrelude" >$@
15 echo "exit _LibCPostlude" >>$@
16 echo "check _LibCCheckUnload" >>$@
18 posixpre.def: $(srcdir)/config/i386/t-nwld
19 echo "start POSIX_Start" >$@
20 echo "exit POSIX_Stop" >>$@
21 echo "check POSIX_CheckUnload" >>$@
23 nwld.o: $(srcdir)/config/i386/nwld.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(TM_P_H)
24 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/nwld.c
27 s-crt0: $(srcdir)/unwind-dw2-fde.h
29 # Build a shared libgcc library for NetWare.
32 SHLIB_NAME = @shlib_base_name@.nlm
33 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
34 SHLIB_DEF = $(srcdir)/config/i386/netware-libgcc.def
35 SHLIB_MAP = $(srcdir)/config/i386/netware-libgcc.exp
36 SHLIB_SRC = $(srcdir)/config/i386/netware-libgcc.c
38 SHLIB_LINK = set -e; \
39 cat $(SHLIB_DEF) >@shlib_base_name@.def; \
40 echo "name $(SHLIB_NAME)" >>@shlib_base_name@.def; \
41 echo "version $(version)" | sed "s!\.!,!g" >>@shlib_base_name@.def; \
43 echo "build $$$$(expr $$$$(<libgcc/build) + 0)" >>@shlib_base_name@.def; \
44 echo "export @$(SHLIB_MAP)" >>@shlib_base_name@.def; \
45 if mpkxdc -n -p @shlib_base_name@.xdc; \
46 then echo "xdcdata @shlib_base_name@.xdc" >>@shlib_base_name@.def; \
47 else echo "WARNING: $(SHLIB_NAME) built without XDC data will not work well." 1>&2; \
49 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME) \
50 $(SHLIB_SRC) -posix -static-libgcc -lnetware \
51 -Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_base_name@.def; \
52 rm -f @shlib_base_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_base_name@.imp; \
53 rm -f libgcc.imp; $(LN_S) @shlib_base_name@.imp libgcc.imp; \
54 expr $$$$(<libgcc/build) + 1 >libgcc/build
56 # $(slibdir) double quoted to protect it from expansion while building
57 # libgcc.mk. We want this delayed until actual install time.
59 $$(SHELL) $(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
60 $$(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \
61 $$(INSTALL_DATA) @shlib_base_name@.imp $$(DESTDIR)$$(libsubdir)/