Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x11 cross-compile errors



On Sun, 28 Dec 2014, Dennis Ferguson wrote:

> On 28 Dec, 2014, at 09:08 , John D. Baker <jdbaker%mylinuxisp.com@localhost> wrote:
> > There seemed to be a "CFLAGS.<sourcefile>" construct to permit per-source
> > setting of CFLAGS contents, but it had no effect when I tried it.  Perhaps
> > I put it in the wrong place?
> 
> I always have trouble figuring this out on the rare occasions I've had to
> do it, but I think setting the flag in COPTS might work better.  The last

Thanks for the tip!  For this situation, my change looks like:

+Index: external/mit/xorg/lib/libmesa.mk
+===================================================================
+RCS file: /cvsroot/src/external/mit/xorg/lib/libmesa.mk,v
+retrieving revision 1.1
+diff -u -p -r1.1 libmesa.mk
+--- external/mit/xorg/lib/libmesa.mk	18 Dec 2014 06:24:28 -0000	1.1
++++ external/mit/xorg/lib/libmesa.mk	28 Dec 2014 20:21:41 -0000
+@@ -124,6 +124,11 @@ SRCS.main= \
+ 	vtxfmt.c \
+ 	es1_conversion.c \
+ 
++.if "${MACHINE_ARCH}" == "powerpc" || "${MACHINE_ARCH}" == "sparc" || \
++    "${MACHINE_ARCH}" == "mips64el"
++COPTS.format_utils.c+=	-O1
++.endif
++
+ # Build files
+ .PATH:	${X11SRCDIR.MesaLib}/../src/mesa/main
+ SRCS.main+= \

The end result is the compiler command line has "-O2" early on but has
"-O1" later, overriding the previous optimisation flag.  With this change,
"format_utils.c" compiles and my build of macppc w/gcc48 is proceeding.
I will back up to sparc and evbmips-mips64el to confirm once it finishes.

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index