Forgot to attach a sample GNUmakefile and program to demonstrate this issue. Attached here.
include $(GNUSTEP_MAKEFILES)/common.make
HOST_ARCH := $(shell echo $(GNUSTEP_HOST_CPU) | sed -e s/i.86/x86/ -e s/amd64/x86_64/ ) BITS=$(shell getconf LONG_BIT) CPU_ARCH=$(shell uname -m) CPU_ARCH_CLEAN=$(CPU_ARCH) ifneq (x86_64,$(CPU_ARCH)) ifeq (86,$(findstring 86,$(CPU_ARCH))) CPU_ARCH_CLEAN = x86 endif endif first: all @echo "GNUSTEP_HOST_CPU=${GNUSTEP_HOST_CPU}" @echo "GNUSTEP_HOST=${GNUSTEP_HOST}" @echo "CPU BITS=${BITS}" @echo "CPU_ARCH=${CPU_ARCH}" @echo "CPU_ARCH_CLEAN=${CPU_ARCH_CLEAN}" @echo "HOST_ARCH=${HOST_ARCH}" ADDITIONAL_OBJCFLAGS += -DHOST_CPU=$(HOST_ARCH) TOOL_NAME = test test_OBJC_FILES = main.m include ${GNUSTEP_MAKEFILES}/tool.make
#import "Foundation/Foundation.h" #define QUOTEME(x) #x #define QUOTEVAL(x) QUOTEME(x) int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString * compileCpu = [NSString stringWithCString: QUOTEVAL(HOST_CPU)]; NSLog(@"Compiletime GNUSTEP_HOST_CPU: %@", compileCpu); id foo = [[[NSProcessInfo processInfo] environment] objectForKey:@"GNUSTEP_HOST_CPU"]; NSLog(@"Environment GNUSTEP_HOST_CPU: %@", foo); [pool release]; return 0; }
signature.asc
Description: This is a digitally signed message part