From naddy@unix-ag.uni-kl.de Mon Oct 11 09:46:01 1999
Return-Path: <naddy@unix-ag.uni-kl.de>
Received: from news.uni-kl.de (news.uni-kl.de [131.246.137.51])
	by hub.freebsd.org (Postfix) with SMTP id B6C7414CAA
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Oct 1999 09:45:38 -0700 (PDT)
	(envelope-from naddy@unix-ag.uni-kl.de)
Received: from sushi.unix-ag.uni-kl.de
           ( root@sushi.unix-ag.uni-kl.de [131.246.89.13] ) by news.uni-kl.de
          id aa04639 for <FreeBSD-gnats-submit@freebsd.org>;
          11 Oct 1999 18:47 MESZ
Received: from fettuccini.unix-ag.uni-kl.de (fettuccini.unix-ag.uni-kl.de [131.246.89.27])
	by sushi.unix-ag.uni-kl.de (8.9.1a/8.9.1) with ESMTP id SAA27355
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Oct 1999 18:45:27 +0200
Received: (from naddy@localhost)
	by fettuccini.unix-ag.uni-kl.de (8.9.3/8.9.3) id SAA44077;
	Mon, 11 Oct 1999 18:45:35 +0200 (CEST)
	(envelope-from naddy)
Message-Id: <199910111645.SAA44077@fettuccini.unix-ag.uni-kl.de>
Date: Mon, 11 Oct 1999 18:45:35 +0200 (CEST)
From: Christian Weisgerber <naddy@unix-ag.uni-kl.de>
Reply-To: naddy@unix-ag.uni-kl.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: devel/boehm-gc ignores CFLAGS
X-Send-Pr-Version: 3.2

>Number:         14262
>Category:       ports
>Synopsis:       devel/boehm-gc ignores CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 11 09:50:00 PDT 1999
>Closed-Date:    Thu Nov 25 08:13:34 PST 1999
>Last-Modified:  Thu Nov 25 08:14:31 PST 1999
>Originator:     Christian Weisgerber
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Unix AG, Uni Kaiserslautern
>Environment:

n/a

>Description:

The devel/boehm-gc port ignores the CC/CXX/CFLAGS/CXXFLAGS variables.

>How-To-Repeat:

cd /usr/ports/devel/boehm-gc && make

>Fix:

diff -uNr /usr/ports/devel/boehm-gc/patches/patch-aa boehm-gc/patches/patch-aa
--- /usr/ports/devel/boehm-gc/patches/patch-aa	Tue Aug  3 14:57:39 1999
+++ boehm-gc/patches/patch-aa	Mon Oct 11 18:31:47 1999
@@ -1,6 +1,16 @@
---- Makefile.orig	Tue Jul 20 02:13:46 1999
-+++ Makefile	Tue Jul 20 02:17:01 1999
-@@ -16,8 +16,35 @@
+--- Makefile.orig	Fri Mar 26 00:41:43 1999
++++ Makefile	Mon Oct 11 18:31:14 1999
+@@ -8,16 +8,44 @@
+ #	 c++ interface to gc.a
+ # cord/de - builds dumb editor based on cords.
+ ABI_FLAG=
+-CC=cc $(ABI_FLAG)
+-CXX=CC $(ABI_FLAG)
++CC+= $(ABI_FLAG)
++CXX+= $(ABI_FLAG)
+ AS=as $(ABI_FLAG)
+ #  The above doesn't work with gas, which doesn't run cpp.
+ #  Define AS as `gcc -c -x assembler-with-cpp' instead.
  #  Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
  #  if you use something other than the default ABI on your machine.
  
@@ -10,8 +20,9 @@
 +# The new c++-t and c++-nt (test and notest) are because we don't want
 +# to fill anyone's log with leak messages! - MMCG
 +
-+CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
++GCFLAGS= -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
 +		-DNO_EXECUTE_PERMISSION -DSILENT -DREDIRECT_MALLOC=GC_malloc
++CFLAGS+= $(GCFLAGS)
 +
 +LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
 +
@@ -37,7 +48,16 @@
  # For dynamic library builds, it may be necessary to add flags to generate
  # PIC code, e.g. -fPIC on Linux.
  
-@@ -183,8 +210,6 @@
+@@ -120,7 +148,7 @@
+     -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
+ #   Flags for building libgc.a -- the last two are required.
+ 
+-CXXFLAGS= $(CFLAGS) 
++CXXFLAGS+= $(GCFLAGS) 
+ AR= ar
+ RANLIB= ranlib
+ 
+@@ -183,8 +211,6 @@
  # not time-critical anyway.
  # Set SPECIALCFLAGS to -q nodirect_code on Encore.
  
@@ -46,7 +66,7 @@
  pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h gcconfig.h mach_dep.o $(SRCS)
  	make -f PCR-Makefile depend
  	make -f PCR-Makefile
-@@ -222,13 +247,18 @@
+@@ -222,13 +248,18 @@
  	./if_mach HP_PA "" $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld
  	./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
  

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Thu Nov 25 08:13:34 PST 1999 
State-Changed-Why:  
These changes were submitted as part of ports/14573. 
>Unformatted:
