On Thu, Jul 12, 2007 at 04:37:09PM +0200, Stefan Reinauer wrote:
Index: HACKING
--- HACKING (revision 448) +++ HACKING (working copy) @@ -32,7 +32,18 @@
- dot (>= 1.8.10) http://www.graphviz.org/
+Building on MacOS X
^ Space? What's the "official" name?
+-------------------
+You have to install MacPorts (tried with 1.4)
^ Full stop
+Then you go
- $ sudo port install i386-elf-binutils
- $ sudo port install i386-elf-gcc
- $ sudo port install bison
- $ rehash
Third-party Code and License Overview
Index: Makefile
--- Makefile (revision 448) +++ Makefile (working copy) @@ -45,7 +45,7 @@ HOSTCC := gcc HOSTCXX := g++ HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
-Wno-unused -Wno-sign-compare
-Wno-unused -Wno-sign-compare -DKBUILD_NO_NLS
Is this causing problems on OS X? Which? Why don't we see the problems on other systems?
LEX := flex LYX := lyx @@ -96,6 +96,8 @@ AS := $(AS_$(ARCH)) LD := $(LD_$(ARCH)) OBJCOPY := $(OBJCOPY_$(ARCH)) +AR := $(AR_$(ARCH))
CFLAGS += $(CFLAGS_$(ARCH))
CPPFLAGS := $(LINUXBIOSINCLUDE) @@ -144,7 +146,7 @@ $(Q)printf "#define LINUXBIOS_COMPILE_TIME "`LANG= date +%T`"\n" >> $(obj)/build.h $(Q)printf "#define LINUXBIOS_COMPILE_BY "$(shell PATH=$$PATH:/usr/ucb whoami)"\n" >> $(obj)/build.h $(Q)printf "#define LINUXBIOS_COMPILE_HOST "$(shell hostname)"\n" >> $(obj)/build.h
- $(Q)printf "#define LINUXBIOS_COMPILE_DOMAIN "$(shell which dnsdomainname 1>/dev/null && dnsdomainname || domainname)"\n" >> $(obj)/build.h
- $(Q)printf "#define LINUXBIOS_COMPILE_DOMAIN "$(shell test `uname -s` == "Linux" && dnsdomainname || domainname)"\n" >> $(obj)/build.h
Is 'uname -s' guaranteed to work everywhere?
"x86")
- echo "CC_x86 := gcc"
- CC="gcc"
- if [ "$OS" != "Darwin" ]; then
echo "CC_x86 := gcc"
CC="gcc"
- searchgnu as >/dev/null && echo "AS_x86 := $(searchgnu as)"
- searchgnu ld >/dev/null && echo "LD_x86 := $(searchgnu ld)"
- searchgnu objcopy >/dev/null && echo "OBJCOPY_x86 := $(searchgnu objcopy)"
searchgnu ar >/dev/null && echo "AR_x86 := $(searchgnu ar)"
searchgnu as >/dev/null && echo "AS_x86 := $(searchgnu as)"
searchgnu ld >/dev/null && echo "LD_x86 := $(searchgnu ld)"
searchgnu objcopy >/dev/null && echo "OBJCOPY_x86 := $(searchgnu objcopy)"
- else
CC="i386-elf-gcc-3.4.3"
echo "CC_x86 := i386-elf-gcc-3.4.3"
Can this be generalized somehow? You don't want to change this everytime the gcc version number there changes...
echo "AR_x86 := i386-elf-ar"
echo "AS_x86 := i386-elf-as"
echo "LD_x86 := i386-elf-ld"
echo "OBJCOPY_x86 := i386-elf-objcopy"
- fi ;;
*) # FIXME: This should be detected. CC="i386-linux-gcc" echo "CC_x86 := i386-linux-gcc"
- echo "AR_x86 := i386-linux-ar" echo "AS_x86 := i386-linux-as" echo "LD_x86 := i386-linux-ld" echo "OBJCOPY_x86 := i386-linux-objcopy"
Index: util/dtc/libdt.c
--- util/dtc/libdt.c (revision 448) +++ util/dtc/libdt.c (working copy) @@ -23,8 +23,8 @@
#include "flat_dt.h"
-#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) -#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) +#define DALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +#define PALIGN(p, a) ((void *)(DALIGN((unsigned long)(p), (a))))
Hm? Why? What's the rationale? Please add a comment.
Patch looks good otherwise, doesn't break the build for non-Mac-OS-X systems, it seems.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Uwe.