Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2002 13:30:58 -0400 (EDT)
From:      Donn Miller <dmmiller@cvzoom.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/40271: System CFLAGS not included everywhere in the XFree86-4-libraries port
Message-ID:  <200207061730.g66HUw9J002073@acs-24-154-77-216.zoominternet.net>

next in thread | raw e-mail | index | archive | help

>Number:         40271
>Category:       ports
>Synopsis:       System CFLAGS not included everywhere in the XFree86-4-libraries port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 06 10:40:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Donn Miller
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD acs-24-154-77-216.zoominternet.net 4.6-STABLE FreeBSD 4.6-STABLE #0: Fri Jul 5 02:25:03 EDT 2002 dmmiller@daemonstar.zoominternet.net:/usr/obj/usr/src/sys/CUSTOM i386


	
>Description:
The XFree86-4-libraries port doesn't include the CFLAGS specified in
/etc/make.conf on all compile lines, specifically those cc lines that
compile object files into "unshared" directories.  This patch ensures
that the CFLAGS are included on all compile lines.  This patch is
platform independent to the best of my knowledge.

>How-To-Repeat:
Try compiling the XFree86-4-libraries port.  Note that the CFLAGS
specified in /etc/make.conf won't be included on all compile lines.
I'd recommend testing this patch with /usr/X11R6/lib/X11/config moved
out of the way, because this port tends to read in the CFLAGS
specified in host.def or xf86site.def in an already existing
/usr/X11R6 installation.   I.e., 

mv /usr/X11R6/lib/X11/config /usr/X11R6/lib/X11/config.old

>Fix:

Apply this patch.  Note that this patch deletes files/patch-c*, as
they are not needed anymore.

diff -urN /usr/ports/x11/XFree86-4-libraries/Makefile /usr/ports/x11/XFree86-4-libraries.mod/Makefile
--- /usr/ports/x11/XFree86-4-libraries/Makefile	Tue Mar 19 19:33:47 2002
+++ /usr/ports/x11/XFree86-4-libraries.mod/Makefile	Sat Jul  6 04:32:58 2002
@@ -46,7 +46,8 @@
 			BuildXIE=${BuildXIE} \
 			BuildAoutLibraries=${BuildAoutLibraries} \
 			ForceNormalLib=${ForceNormalLib} \
-			DebuggableLibraries=${DebuggableLibraries}
+			DebuggableLibraries=${DebuggableLibraries} \
+			OPTFLAGS="${CFLAGS}"
 MAKE_ENV=		PKGNAMEPREFIX=${PKGNAMEPREFIX} \
 			PORTNAME=${PORTNAME} \
 			PORTVERSION=${PORTVERSION}
diff -urN /usr/ports/x11/XFree86-4-libraries/files/patch-c /usr/ports/x11/XFree86-4-libraries.mod/files/patch-c
--- /usr/ports/x11/XFree86-4-libraries/files/patch-c	Tue Jun 12 10:59:51 2001
+++ /usr/ports/x11/XFree86-4-libraries.mod/files/patch-c	Wed Dec 31 19:00:00 1969
@@ -1,20 +0,0 @@
---- config/cf/Imake.tmpl.orig	Fri Apr 27 06:09:38 2001
-+++ config/cf/Imake.tmpl	Mon Jun  4 19:29:44 2001
-@@ -1487,7 +1487,7 @@
-        CXXOPTIONS = CplusplusOptions
-       CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) 
-        CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES)
--         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
-+         CXXFLAGS += $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
- #endif
-          COMPRESS = CompressCmd
-           GZIPCMD = GzipCmd
-@@ -1682,7 +1682,7 @@
-  */
-       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
-        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)
--           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
-+           CFLAGS += $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
-         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
-          LDPRELIB = LdPreLib
-         LDPOSTLIB = LdPostLib
diff -urN /usr/ports/x11/XFree86-4-libraries/files/patch-c2 /usr/ports/x11/XFree86-4-libraries.mod/files/patch-c2
--- /usr/ports/x11/XFree86-4-libraries/files/patch-c2	Sat Mar 16 18:40:17 2002
+++ /usr/ports/x11/XFree86-4-libraries.mod/files/patch-c2	Wed Dec 31 19:00:00 1969
@@ -1,20 +0,0 @@
---- /usr/local/src/XFree86-4/ORIG/xc/config/cf/Library.tmpl	Tue Dec  5 11:59:31 2000
-+++ config/cf/Library.tmpl	Tue Dec 19 17:18:56 2000
-@@ -67,7 +67,7 @@
- STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
- CDEBUGFLAGS = LibraryCDebugFlags
- CLIBDEBUGFLAGS = LibraryDebugOpt
--     CFLAGS = $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
-+     CFLAGS += $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
- # if defined(LargePICTable) && LargePICTable && defined(LargePositionIndependentCFlags)
-    PICFLAGS = LargePositionIndependentCFlags
- # endif
-@@ -92,7 +92,7 @@
-   STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
- CXXDEBUGFLAGS = LibraryCplusplusDebugFlags
- CXXLIBDEBUGFLAGS = LibraryDebugOpt
--     CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
-+     CXXFLAGS += $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
- # if defined(LargePICTable) && LargePICTable
- #  ifdef LargePositionIndependentCplusplusFlags
-   CXXPICFLAGS = LargePositionIndependentCplusplusFlags
diff -urN /usr/ports/x11/XFree86-4-libraries/scripts/configure /usr/ports/x11/XFree86-4-libraries.mod/scripts/configure
--- /usr/ports/x11/XFree86-4-libraries/scripts/configure	Sat Mar 16 18:40:18 2002
+++ /usr/ports/x11/XFree86-4-libraries.mod/scripts/configure	Sat Jul  6 04:32:34 2002
@@ -72,6 +72,7 @@
     echo "#define Freetype2Dir ${LOCALBASE}" >> $LOCALDEF
     echo "#define FreeBSDBuildXlib  YES" >> $LOCALDEF
     echo "#define FreeBSDBuildXbin   NO" >> $LOCALDEF
+    echo "#define OptimizedCDebugFlags ${OPTFLAGS}" >> $LOCALDEF
 
     HasXdmAuth=YES
 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207061730.g66HUw9J002073>