Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2013 00:16:59 +0000 (UTC)
From:      Benno Rice <benno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r246101 - in projects/uefi: . lib/libstand
Message-ID:  <201301300017.r0U0H0CI009731@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: benno
Date: Wed Jan 30 00:16:59 2013
New Revision: 246101
URL: http://svnweb.freebsd.org/changeset/base/246101

Log:
  Remove the Makefile glue that forces libstand to build for i386 on amd64.
  
  Note that we still get a 32-bit version built by the lib32 pass so we can
  use that for generating 32-bit boot code.
  
  Sponsored by:	FreeBSD Foundation

Modified:
  projects/uefi/UEFI-TODO.txt
  projects/uefi/lib/libstand/Makefile

Modified: projects/uefi/UEFI-TODO.txt
==============================================================================
--- projects/uefi/UEFI-TODO.txt	Wed Jan 30 00:12:51 2013	(r246100)
+++ projects/uefi/UEFI-TODO.txt	Wed Jan 30 00:16:59 2013	(r246101)
@@ -2,7 +2,7 @@
 
 Part the First: 64-bit EFI loader
 
-- Make libstand build natively as 64-bit on amd64.
++ Make libstand build natively as 64-bit on amd64.
 - Adjust non-EFI boot code to use /usr/lib32/libstand.a.
 - Test that the other boot code still actually works.
 - Add bits to build 64-bit loader.efi.

Modified: projects/uefi/lib/libstand/Makefile
==============================================================================
--- projects/uefi/lib/libstand/Makefile	Wed Jan 30 00:12:51 2013	(r246100)
+++ projects/uefi/lib/libstand/Makefile	Wed Jan 30 00:16:59 2013	(r246101)
@@ -21,16 +21,21 @@ CFLAGS+= -ffreestanding -Wformat
 CFLAGS+= -I${.CURDIR}
 
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+=	-mpreferred-stack-boundary=2
 CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
 .endif
+.if ${MACHINE_CPUARCH} == "i386"
+CFLAGS+=	-march=i386 -mpreferred-stack-boundary=2
+.endif
+.if ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+=	-fPIC
+.endif
 .if ${MACHINE} == "pc98"
 CFLAGS+=	-Os
 .endif
 .if ${MACHINE_CPUARCH} == "powerpc"
 CFLAGS+=	-msoft-float -D_STANDALONE -DNETIF_DEBUG
 .endif
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
+.if ${MACHINE_ARCH} == "powerpc64"
 CFLAGS+=	-m32 -I.
 .endif
 .if ${MACHINE_CPUARCH} == "arm"
@@ -86,12 +91,10 @@ SRCS+=	syncicache.c
 SRCS+= uuid_equal.c uuid_is_nil.c
 
 # _setjmp/_longjmp
-.if ${MACHINE_CPUARCH} == "amd64"
-.PATH: ${.CURDIR}/i386
-.elif ${MACHINE_ARCH} == "powerpc64"
+.if ${MACHINE_ARCH} == "powerpc64"
 .PATH: ${.CURDIR}/powerpc
 .else
-.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
+.PATH: ${.CURDIR}/${MACHINE_ARCH}
 .endif
 SRCS+=	_setjmp.S
 
@@ -162,12 +165,3 @@ SRCS+=	nandfs.c
 
 .include <bsd.lib.mk>
 
-.if ${MACHINE_CPUARCH} == "amd64"
-beforedepend ${OBJS}: machine
-cleandepend: cleanmachine
-cleanmachine:
-	rm -f machine
-
-machine:
-	ln -s ${.CURDIR}/../../sys/i386/include machine
-.endif



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