delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/07/15/07:07:26

From: "Andrew Cottrell" <andrewdjgpp AT swiftdsl DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>
Cc: "'Richard Dawe'" <rich AT phekda DOT freeserve DOT co DOT uk>
Subject: GCC 3.3 & LIBC - build process change (attempt #2)
Date: Tue, 15 Jul 2003 21:01:15 +1000
Message-ID: <000001c34ac0$6cc19cb0$0101a8c0@acp42g>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.4510
Importance: Normal
In-Reply-To: <001901c31dfe$cb7cfa90$0100a8c0@acp42g>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h6FB1ak17735
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

This is the second attempt at a patch the LIBC build process to allow GCC
3.3 to build the CVS source (the updated source files were patched a few
weeks ago to support GCC 3.3).

The following response was sent by Richard and as such I have re-worked the
patch to hopefully fix these issues:-
> Perhaps we could generate gpp.opt from gcc.opt using a script that filters
out invalid options for 
> C++. For an example see noprof.sed, which we use to filter out the
profiling options, when 
> building the profiling code. noprof.sed is only used with one source file,
so we apply that 
> on the fly with sed to gcc.opt. gpp.opt should be generated once, I think,
to avoid the overhead 
> of starting sed for each C++ file.

The original email header is as follows, in case you want to have a look at
the original thread:-
> -----Original Message-----
> From: Andrew Cottrell [mailto:acottrel AT ihug DOT com DOT au] 
> Sent: Monday, 19 May 2003 10:04 PM
> To: djgpp-workers AT delorie DOT com
> Cc: Andris Pavenis; Richard Dawe
> Subject: GCC 3.3 & LIBC patch #2 - build process change

Please let me know if there is a problem with word wrap or embeded chars as
I am now using Outlook instead or Outlook Express and am still getting the
bugs ironed out of the setup.

The patch consists of the following files:-
	gpp_opt.sed			NEW
	noprofpp.sed		NEW
	makefile.inc		Updated process for C++ files
	libemu\src\makefile	C++ files use the new process

The files are:-

*** \djgppcvs\src\gpp_opt.sed	Thu Jan  1 10:00:00 1970
--- src\gpp_opt.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\noprofpp.sed	Thu Jan  1 10:00:00 1970
--- src\noprofpp.sed	Tue Jul 15 19:38:46 2003
***************
*** 0 ****
--- 1,22 ----
+ # Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details
+ # Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details
+ #
+ # For building the profiling support code (src/libc/crt0/mcount.c),
+ # strip out profiling options, to avoid a chicken-and-egg problem
+ # in a profiling version of libc (the profiling support code calling
+ # profiling support code).
+ #
+ s:^-a$::
+ s:^-ax$::
+ s:^-finstrument-functions$::
+ s:^-fprofile-arcs$::
+ s:^-ftest-coverage$::
+ s:^-p$::
+ s:^-pg$::
+ 
+ # 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\makefile.inc	Wed Feb 26 21:04:30 2003
--- src\makefile.inc	Tue Jul 15 20:36:06 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)/../noprofpp.sed
$(TOP)/../gcc.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
*************** $(HOSTBIN)/%.exe : %
*** 155,160 ****
--- 160,168 ----
  all :: $(OBJS) $(EXTRA_OBJS) $(EXTRA_FILES)
  	$(NOP)
  
+ $(TOP)/../gpp.opt : $(TOP)/../gcc.opt
+ 	sed -f $(TOP)/../gpp_opt.sed $< > $@
+ 
  ifneq ($(MAKEFILE_LIB),1)
  all :: makefile.oh
  makefile.oh : makefile

  *** \djgppcvs\src\libemu\src\makefile	Fri Oct 18 10:00:26 2002
--- 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 $<





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019