From: "Andrew Cottrell" To: "'Richard Dawe'" Cc: Subject: GCC 3.3 & LIBC - build process change (attempt #3) Date: Sun, 20 Jul 2003 15:39:09 +1000 Message-ID: <000a01c34e81$415df450$0101a8c0@acp42g> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h6K5dR529694 Reply-To: djgpp-workers AT delorie DOT com Richard, Below is attempt 3 for changing the LIBC build process for GCC 3.3 . This morning I found the following:- 1) If I added the "$(OBJS): $(TOP)/../gpp.opt" line then the build stopped after the stubs make was completed and produced a corrupted libc.a If I reverted back to my change from yesterday or Friday for the gpp dependancy as follows then the build works okay:- all :: $(TOP)/../gpp.opt $(OBJS) $(EXTRA_OBJS) $(EXTRA_FILES) $(NOP) 2) I modified the src\makefile in order for make clean to remove gpp.opt 3) make clean did not remove the djasm\djasm.o file so I added the followign line to the src\makefile $(MAKE) -C djasm clean The patch below consists of the following files: * src\makefile.inc , modifed to create gpp.opt and to setup variables to build C++ files * src\makefile , modified to delete gpp.opt and a non related change to delete djasm\djasm.o * src\gpp.sed , new file * src\libemu\src\makefile , uses updated C++ variables defined in src\makefile.inc Any problems with this attempt? Andrew *** \djgppcvs\src\makefile.inc Sun Jul 20 12:01:00 2003 --- src\makefile.inc Sun Jul 20 15:37:50 2003 *************** *** 1,3 **** --- 1,4 ---- + # Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details # Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details # Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details # Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details *************** MAKEFLAGS := --no-print-directory *** 13,18 **** --- 14,20 ---- # ifeq ($(CROSS_BUILD),1) GCC_OPT := $(shell cat $(TOP)/../gcc.opt) + GPP_OPT := $(shell cat $(TOP)/../gpp.opt) GCCL_OPT := $(shell cat $(TOP)/../gcc-l.opt) endif *************** ASFLAGS += -DGAS_MINORMINOR=$(GAS_MINORM *** 59,67 **** --- 61,71 ---- # ifneq ($(CROSS_BUILD),1) XGCC = $(CROSS_GCC) @$(TOP)/../gcc.opt -I. -I- -isystem $(TOP)/../../include $(CFLAGS) + XGPP = $(CROSS_GCC) @$(TOP)/../gpp.opt -I. -I- -isystem $(TOP)/../../include $(CFLAGS) XLGCC = $(CROSS_GCC) -s @$(TOP)/../gcc-l.opt -I. -I- -isystem $(TOP)/../../include $(CFLAGS) else XGCC = $(CROSS_GCC) $(GCC_OPT) -I. -I- -isystem $(TOP)/../../include $(CFLAGS) + XGPP = $(CROSS_GCC) $(GPP_OPT) -I. -I- -isystem $(TOP)/../../include $(CFLAGS) XLGCC = $(CROSS_GCC) $(GCCL_OPT) -I. -I- -isystem $(TOP)/../../include $(CFLAGS) endif *************** endif *** 72,77 **** --- 76,82 ---- # profiling support code). # XNOPGGCC = $(CROSS_GCC) $(shell sed -f $(TOP)/../noprof.sed $(TOP)/../gcc.opt) -I. -I- -isystem $(TOP)/../../include $(CFLAGS) + XNOPGGPP = $(CROSS_GCC) $(shell sed -f $(TOP)/../noprof.sed $(TOP)/../gpp.opt) -I. -I- -isystem $(TOP)/../../include $(CFLAGS) MISC = $(TOP)/../misc.exe *************** MISC = $(TOP)/../misc.exe *** 79,86 **** @$(MISC) echo - $(CROSS_GCC) '...' -c $< @$(XGCC) -c $< %.o : %.cc ! @$(MISC) echo - $(CROSS_GCC) '...' -c -fno-exceptions $< ! @$(XGCC) -c -fno-exceptions $< %.o : %.S @$(MISC) echo - $(CROSS_GCC) '...' -c $< @$(XGCC) -c $< --- 84,91 ---- @$(MISC) echo - $(CROSS_GCC) '...' -c $< @$(XGCC) -c $< %.o : %.cc ! @$(MISC) echo - $(CROSS_GPP) '...' -c -fno-exceptions $< ! @$(XGPP) -c -fno-exceptions $< %.o : %.S @$(MISC) echo - $(CROSS_GCC) '...' -c $< @$(XGCC) -c $< *************** MISC = $(TOP)/../misc.exe *** 91,104 **** %.i : %.c $(XGCC) -c $< -E > $@ %.i : %.cc ! $(XGCC) -c $< -E > $@ %.i : %.S $(XGCC) -c $< -E > $@ %.ss : %.c $(XGCC) -c $< -S > $@ %.ss : %.cc ! $(XGCC) -c $< -S > $@ %.c : %.y bison $*.y -o $*.c --- 96,109 ---- %.i : %.c $(XGCC) -c $< -E > $@ %.i : %.cc ! $(XGPP) -c $< -E > $@ %.i : %.S $(XGCC) -c $< -E > $@ %.ss : %.c $(XGCC) -c $< -S > $@ %.ss : %.cc ! $(XGPP) -c $< -S > $@ %.c : %.y bison $*.y -o $*.c *************** $(BIN)/%.exe : $C %.o $L *** 152,160 **** $(HOSTBIN)/%.exe : % $(GCC) -o $@ $^ ! all :: $(OBJS) $(EXTRA_OBJS) $(EXTRA_FILES) $(NOP) ifneq ($(MAKEFILE_LIB),1) all :: makefile.oh makefile.oh : makefile --- 157,169 ---- $(HOSTBIN)/%.exe : % $(GCC) -o $@ $^ ! all :: $(TOP)/../gpp.opt $(OBJS) $(EXTRA_OBJS) $(EXTRA_FILES) $(NOP) + $(TOP)/../gpp.opt : $(TOP)/../gcc.opt + sed -f $(TOP)/../gpp.sed $< > $@ + + ifneq ($(MAKEFILE_LIB),1) all :: makefile.oh makefile.oh : makefile *** \djgppcvs\src\makefile Sun May 11 12:00:32 2003 --- src\makefile Sun Jul 20 15:25:42 2003 *************** clean : misc.exe makemake.exe *** 62,67 **** $(MAKE) -C dxe clean $(MAKE) -C mkdoc clean $(MAKE) -C docs clean -$(MAKE) -C ../zoneinfo/src clean $(MAKE) -f makempty clean ! ./misc.exe rm makemake.exe copyrite.exe misc.exe --- 62,69 ---- $(MAKE) -C dxe clean $(MAKE) -C mkdoc clean $(MAKE) -C docs clean + $(MAKE) -C djasm clean -$(MAKE) -C ../zoneinfo/src clean $(MAKE) -f makempty clean ! ./misc.exe rm gpp.opt ! ./misc.exe rm makemake.exe copyrite.exe misc.exe *** \djgppcvs\src\gpp.sed Thu Jan 1 00:00:00 1970 --- src\gpp.sed Tue Jul 15 20:01:48 2003 *************** *** 0 **** --- 1,7 ---- + # Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details + # + # For building the GPP support option file code strip out + # C options that are not allowed for C++ source + # + s:-Wbad-function-cast::g + s:-Wmissing-declarations::g *** \djgppcvs\src\libemu\src\makefile Sun Jul 20 12:27:06 2003 --- src\libemu\src\makefile Mon May 19 21:46:04 2003 *************** EXTRA_OBJS += emudummy.o *** 11,17 **** include $(TOP)/../makefile.inc %.o : %.cc ! $(XNOPGGCC) -c -fno-exceptions $< %.o : %.c $(XNOPGGCC) -c $< --- 11,17 ---- include $(TOP)/../makefile.inc %.o : %.cc ! $(XNOPGGPP) -c -fno-exceptions $< %.o : %.c $(XNOPGGCC) -c $<