* Uwe Hermann uwe@hermann-uwe.de [070712 21:19]:
+Building on MacOS X
^ Space? What's the "official" name?
Yeah, thanks. Official name is with space: http://www.apple.com/de/macosx/tiger/
@@ -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?
Good question.
/Users/stepan/Devel/LinuxBIOSv3/util/kconfig/lkc.h:12:22: error: libintl.h: No such file or directory /Users/stepan/Devel/LinuxBIOSv3/util/kconfig/mconf.c: In function 'search_conf': /Users/stepan/Devel/LinuxBIOSv3/util/kconfig/mconf.c:535: warning: implicit declaration of function 'gettext' /Users/stepan/Devel/LinuxBIOSv3/util/kconfig/mconf.c:535: warning: incompatible implicit declaration of built-in function 'gettext'
Does anyone know a better way?
Would this work at all? I never saw anything but english texts in kconfig..
- $(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?
uname -s is IEEE Std 1003.2-1992 (POSIX.2). So basically everywhere, yes.
Funny enough, using a return code of "which" seems not to be standard. On OSX it prints an error message and exits with 0.
- 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...
I hope so. MacPorts does not have symlinks for their compiler, that sucks. It was a first shot so it works building locally here. What's better? adding manual link setup to the README?
Or using wild cards?
-#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.
The one is aligning data, so it's D ALIGN ;-)
OSX has a macro called ALIGN with different parameters. What should the comment say? "Don't rename back to ALIGN because it would break Mac OS X" ?
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
Thanks.