Quoting Jean-Yves Lefort <[EMAIL PROTECTED]> (Fri, 12 Jan 2007 12:13:06 +0100):
> On Fri, 12 Jan 2007 11:17:26 +0100 > Alexander Leidinger <[EMAIL PROTECTED]> wrote: > > > Quoting Jean-Yves Lefort <[EMAIL PROTECTED]> (from Thu, 11 Jan 2007 > > 17:21:36 +0000 (UTC)): > > > > > jylefort 2007-01-11 17:21:36 UTC > > > > > > FreeBSD ports repository > > > > > > Modified files: > > > devel/glib20 Makefile > > > Log: > > > On i386 (>= 486) and amd64, fix the arch passed to configure so that > > > glib will implement atomic operations with assembler instructions > > > rather than mutexes (improves performance). > > > > What about setting GNOME_ARCH based upon CPUTYPE instead of hardcoding > > it to i486? > > The problem is not specific to GNOME. I prefer the solution below. > > > Or much better: set --build in bsd.port.mk globally based upon CPUTYPE > > (to iX86 on IA32, I'm not sure if it is wise to change the amd64 one > > globally). > > Yes. And do pass x86_64 for amd64, that's what a majority of configure > scripts expect since they have linux in mind. Hi, the proof of concept is attached. Configure shows i686-portbld... when building glib20 on my machine (CPUTYPE set to athlon-xp). For the final patch I want to sort the list of CPUTYPEs. I'm sending this version to get some testresults (failing ports?) and reviews/comments. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
Index: Mk/bsd.gnome.mk =================================================================== RCS file: /big/FreeBSD-CVS/ports/Mk/bsd.gnome.mk,v retrieving revision 1.138 diff -u -u -r1.138 bsd.gnome.mk --- Mk/bsd.gnome.mk 4 Jan 2007 02:14:44 -0000 1.138 +++ Mk/bsd.gnome.mk 12 Jan 2007 15:50:35 -0000 @@ -122,7 +122,7 @@ gnomeprefix_PREFIX=${LOCALBASE} .endif -gnometarget_CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +gnometarget_CONFIGURE_TARGET=--build=${CONFIGURE_ARCH}-portbld-freebsd${OSREL} ESD_CONFIG?= ${LOCALBASE}/bin/esd-config esound_LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound Index: Mk/bsd.port.mk =================================================================== RCS file: /big/FreeBSD-CVS/ports/Mk/bsd.port.mk,v retrieving revision 1.545 diff -u -u -r1.545 bsd.port.mk --- Mk/bsd.port.mk 8 Jan 2007 00:00:33 -0000 1.545 +++ Mk/bsd.port.mk 13 Jan 2007 18:32:54 -0000 @@ -2858,8 +2862,59 @@ .undef HAS_CONFIGURE .endif +.if !defined(CONFIGURE_ARCH) && defined(CPUTYPE) +. if ${ARCH} == "i386" +. if ${CPUTYPE} == "nocona" || \ + ${CPUTYPE} == "p4" || \ + ${CPUTYPE} == "p4m" || \ + ${CPUTYPE} == "p3" || \ + ${CPUTYPE} == "p3m" || \ + ${CPUTYPE} == "p-m" || \ + ${CPUTYPE} == "p2" || \ + ${CPUTYPE} == "i686" || \ + ${CPUTYPE} == "opteron" || \ + ${CPUTYPE} == "athlon64" || \ + ${CPUTYPE} == "athlon-fx" || \ + ${CPUTYPE} == "athlon-xp" || \ + ${CPUTYPE} == "athlon-mp" || \ + ${CPUTYPE} == "athlon" || \ + ${CPUTYPE} == "crusoe" || \ + ${CPUTYPE} == "athlon-4" || \ + ${CPUTYPE} == "athlon-tbird" || \ + ${CPUTYPE} == "pentium4" || \ + ${CPUTYPE} == "pentium4m" || \ + ${CPUTYPE} == "pentium3" || \ + ${CPUTYPE} == "pentium3m" || \ + ${CPUTYPE} == "pentium-m" || \ + ${CPUTYPE} == "pentium2" || \ + ${CPUTYPE} == "pentium2m" || \ + ${CPUTYPE} == "pentiumpro" || \ + ${CPUTYPE} == "prescott" || \ + ${CPUTYPE} == "k8" || \ + ${CPUTYPE} == "k7" +CONFIGURE_ARCH= i686 +. elif ${CPUTYPE} == "i586" || \ + ${CPUTYPE} == "i586/mmx" || \ + ${CPUTYPE} == "pentium-mmx" || \ + ${CPUTYPE} == "pentium" || \ + ${CPUTYPE} == "k6" || \ + ${CPUTYPE} == "k6-2" || \ + ${CPUTYPE} == "k6-3" || \ + ${CPUTYPE} == "k5" +CONFIGURE_ARCH= i586 +. else +CONFIGURE_ARCH= i486 +. endif +. elif ${ARCH} == "amd64" +CONFIGURE_ARCH= x86_64 +. endif +.endif +.if !defined(CONFIGURE_ARCH) || empty(CONFIGURE_ARCH) +CONFIGURE_ARCH= ${ARCH} +.endif + CONFIGURE_SCRIPT?= configure -CONFIGURE_TARGET?= ${ARCH}-portbld-freebsd${OSREL} +CONFIGURE_TARGET?= ${CONFIGURE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_LOG?= config.log # A default message to print if do-configure fails. Index: devel/glib20/Makefile =================================================================== RCS file: /big/FreeBSD-CVS/ports/devel/glib20/Makefile,v retrieving revision 1.134 diff -u -u -r1.134 Makefile --- devel/glib20/Makefile 11 Jan 2007 17:21:36 -0000 1.134 +++ devel/glib20/Makefile 12 Jan 2007 15:44:42 -0000 @@ -8,7 +8,7 @@ PORTNAME= glib PORTVERSION= 2.12.7 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/},} \ ftp://ftp.gtk.org/pub/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/ \ @@ -46,16 +46,6 @@ .include <bsd.port.pre.mk> -# Let glib use asm code for implementing atomic ops on i386 and amd64. -.if ${ARCH} == "i386" -GLIB_ARCH= i486 -.elif ${ARCH} == "amd64" -GLIB_ARCH= x86_64 -.else -GLIB_ARCH= ${ARCH} -.endif -CONFIGURE_TARGET= --build=${GLIB_ARCH}-portbld-freebsd${OSREL} - .if ( ( ${OSVERSION} < 504101 ) || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600012 ) ) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gthread_gthread-posix.c .endif
_______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[EMAIL PROTECTED]"