make is unaware of OS X 64 bit toolchain

Issue #3 new
michaelian Ennis
created an issue

Having trouble compiling drawterm at all on systems that are running Snow Leopard and are 64 bit capable. The compiler and assembler appear to both be assuming 64 bit binaries are desired. {{{

arch=uname -m|sed 's/i.86/386/;s/Power Macintosh/power/'; \

(cd posix-$arch &&  make)

gcc -Wall -Wno-missing-braces -ggdb -I.. -I../include -I../kern -c -D_THREAD_SAFE -O2 getcallerpc.c gcc -E - < md5block.spp >md5block.s as -o md5block.o md5block.s <stdin>:128:suffix or operands invalid for push' <stdin>:246:suffix or operands invalid forpop' make[1]: [md5block.o] Error 1 make: [libmachdep.a] Error 2 orangutan:drawterm mennis$ uname -m|sed 's/i.86/386/;s/Power Macintosh/power/' 386 orangutan:drawterm mennis$ gcc -v Using built-in specs. Target: i686-apple-darwin10 Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5646)

}}}

Comments (10)

  1. Anonymous
    gcc -o md5block.o md5block.s
    <stdin>:128:suffix or operands invalid for `push'
    <stdin>:246:suffix or operands invalid for `pop'
    
  2. Anonymous

    These changes to Make.OSX allow drawterm to be built on Snow Leopard when the host is 64-bit capable. AS=as -arch i386 CFLAGS= -m32 -Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE $(PTHREAD) -O2 LDFLAGS=$(PTHREAD) -arch i386

    One will not be able to build this as 64-bit until the reliance on carbon is removed. The API's used for making UI's in carbon are unavailable in the 64-bit version. A cocoa port would likely produce the required source for Inferno, and 9vx as well.

  3. michaelian Ennis reporter

    These changes to Make.OSX allow drawterm to be built on Snow Leopard when the host is 64-bit capable by forcing it to output 32-bit code.

    AS=as -arch i386 
    CFLAGS= -m32 -Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE $(PTHREAD) -O2 
    LDFLAGS=$(PTHREAD) -arch i386
    

    One will not be able to build this as 64-bit until the reliance on carbon is removed. The API's used for making UI's in carbon are unavailable in the 64-bit version. A cocoa port would likely produce the required source for Inferno, and 9vx as well.

  4. michaelian Ennis reporter

    Since the existing CONF should work for PPC as well as Intel 32 bit perhaps a more appropriate solution would be a new Make.OSX-x64 or however the 64-bit arch should be named.

  5. Log in to comment