IAIK/sweb

check compilation on osx

dgruss opened this issue · 14 comments

windows needed a few compile fixes... how is it on osx?

Will try and report back.

thanks ^^

It doesn't work for me unless I've missed something. I stuck to my own short instructions from https://github.com/GhostLyrics/homebrew-sweb/blob/master/README.markdown

Output from cmake:

=> cmake ../sweb/
-- The ASM compiler identification is unknown
-- Found assembler: /usr/bin/cc
-- Warning: Did not find file Compiler/-ASM
-- Target architecture: x86/32
CMake Warning (dev) at CMakeLists.txt:203 (add_custom_target):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "install" is reserved or not valid for certain CMake
  features, such as generator expressions, and may result in undefined
  behavior.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:333 (add_custom_target):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "help" is reserved or not valid for certain CMake features,
  such as generator expressions, and may result in undefined behavior.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ghostlyrics/tmp/build

From the cmake output I get the impression that it can't find my nasm binary.

Output from make:

=> make
Scanning dependencies of target userspace_libc
[  1%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/atoi.c.o
[  2%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/ctype.c.o
[  3%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/exec.c.o
[  3%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/file_alloc.c.o
[  4%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/mman.c.o
[  5%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/nonstd.c.o
[  5%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/printf.c.o
[  6%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/pthread.c.o
[  8%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/read.c.o
[  8%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/scanf.c.o
[  9%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/sched.c.o
[ 10%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/semaphore.c.o
[ 10%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/stdlib.c.o
[ 11%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/string.c.o
[ 12%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/time.c.o
[ 12%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/unistd.c.o
[ 13%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/wait.c.o
[ 14%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/write.c.o
[ 16%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/__/__/arch/x86/32/common/userspace/syscalls.c.o
Linking C static library ../../lib/userspace/libuserspace_libc.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../../lib/userspace/libuserspace_libc.a the table of contents is empty (no object file members in the library define global symbols)
[ 16%] Built target userspace_libc
Scanning dependencies of target mult.sweb
[ 16%] Building C object userspace/tests/CMakeFiles/mult.sweb.dir/mult.c.o
Linking C executable ../mult.sweb
/usr/local/Cellar/sweb-gcc/4.9.1/lib/gcc/i686-linux-gnu/4.9.1/../../../../i686-linux-gnu/bin/ld: warning: cannot find entry symbol arch_paths_first; defaulting to 0000000008000000
[ 16%] Built target mult.sweb
Scanning dependencies of target exe2minixfs
[ 17%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/main.cpp.o
error: invalid integral value 'g' in '-Og'
error: invalid integral value 'g' in '-Og'
make[2]: *** [utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/main.cpp.o] Error 1
make[1]: *** [utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/all] Error 2
make: *** [all] Error 2

ok i think i have fixed some of the problems...

error: invalid integral value 'g' in '-Og'

fixed this --> -O0 instead of -Og

regarding asm...

-- Warning: Did not find file Compiler/-ASM

i think one cmake variable was not set, that should be fixed now...
btw: we do not use nasm since today anymore :) one less tool to install

i will fix the cmake warnings...

Cmake run is relatively clean now.

=> cmake ../sweb/
-- The ASM compiler identification is unknown
-- Found assembler: /usr/bin/cc
-- Warning: Did not find file Compiler/-ASM
-- Target architecture: x86/32
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ghostlyrics/tmp/build

Building goes along further but still breaks down. Reason seams to be gstabs.

clang: error: unsupported option '-gstabs2'

I also noticed quite a lot of format warnings in MinixStorageManager.cpp.


Here's the full output.

 => make
Scanning dependencies of target userspace_libc
[  1%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/atoi.c.o
[  2%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/ctype.c.o
[  3%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/exec.c.o
[  3%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/file_alloc.c.o
[  4%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/mman.c.o
[  5%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/nonstd.c.o
[  5%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/printf.c.o
[  6%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/pthread.c.o
[  8%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/read.c.o
[  8%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/scanf.c.o
[  9%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/sched.c.o
[ 10%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/semaphore.c.o
[ 10%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/stdlib.c.o
[ 11%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/string.c.o
[ 12%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/time.c.o
[ 12%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/unistd.c.o
[ 13%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/wait.c.o
[ 14%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/src/write.c.o
[ 16%] Building C object userspace/libc/CMakeFiles/userspace_libc.dir/__/__/arch/x86/32/common/userspace/syscalls.c.o
Linking C static library ../../lib/userspace/libuserspace_libc.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../../lib/userspace/libuserspace_libc.a the table of contents is empty (no object file members in the library define global symbols)
[ 16%] Built target userspace_libc
Scanning dependencies of target mult.sweb
[ 16%] Building C object userspace/tests/CMakeFiles/mult.sweb.dir/mult.c.o
Linking C executable ../mult.sweb
/usr/local/Cellar/sweb-gcc/4.9.1/lib/gcc/i686-linux-gnu/4.9.1/../../../../i686-linux-gnu/bin/ld: warning: cannot find entry symbol arch_paths_first; defaulting to 0000000008000000
[ 16%] Built target mult.sweb
Scanning dependencies of target exe2minixfs
[ 17%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/main.cpp.o
[ 18%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/util/Bitmap.cpp.o
[ 18%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/Dentry.cpp.o
[ 19%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/FileDescriptor.cpp.o
[ 20%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/FileSystemInfo.cpp.o
[ 20%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/Superblock.cpp.o
[ 21%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/File.cpp.o
[ 22%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/PathWalker.cpp.o
[ 22%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/VfsMount.cpp.o
[ 24%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/VfsSyscall.cpp.o
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:104:49: warning: format specifies type 'int' but the argument has type 'Superblock *' [-Wformat]
  debug(VFSSYSCALL, "(mkdir) current_sb: %d\n", current_sb);
                                         ~~     ^~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:105:62: warning: format specifies type 'int' but the argument has type 'FileSystemType *' [-Wformat]
  debug(VFSSYSCALL, "(mkdir) current_sb->getFSType(): %d\n", current_sb->getFSType());
                                                      ~~     ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:108:61: warning: format specifies type 'int' but the argument has type 'Inode *' [-Wformat]
  debug(VFSSYSCALL, "(mkdir) sub_dentry->getInode(): %d\n", sub_dentry->getInode());
                                                     ~~     ^~~~~~~~~~~~~~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:198:49: warning: format specifies type 'int' but the argument has type 'Inode *' [-Wformat]
  debug(VFSSYSCALL, "(rm) current_inode: %d\n", current_inode);
                                         ~~     ^~~~~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:209:72: warning: format specifies type 'int' but the argument has type 'Inode *' [-Wformat]
    debug(VFSSYSCALL, "remove the inode %d from the list of sb: %d\n", current_inode, sb);
                                        ~~                             ^~~~~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/VfsSyscall.cpp:209:87: warning: format specifies type 'int' but the argument has type 'Superblock *' [-Wformat]
    debug(VFSSYSCALL, "remove the inode %d from the list of sb: %d\n", current_inode, sb);
                                                                ~~                    ^~
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
6 warnings generated.
[ 25%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/MinixFSFile.cpp.o
[ 25%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/MinixFSInode.cpp.o
[ 26%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/MinixFSSuperblock.cpp.o
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixFSSuperblock.cpp:380:61: warning: expression result unused [-Wunused-value]
  (fread(buffer, 1, BLOCK_SIZE * num_blocks, (FILE*)s_dev_) == BLOCK_SIZE * num_blocks);
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixFSSuperblock.cpp:396:62: warning: expression result unused [-Wunused-value]
  (fwrite(buffer, 1, BLOCK_SIZE * num_blocks, (FILE*)s_dev_) == BLOCK_SIZE * num_blocks);
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[ 27%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/MinixFSZone.cpp.o
[ 27%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/MinixStorageManager.cpp.o
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixStorageManager.cpp:72:69: warning: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      debug(M_STORAGE_MANAGER, "acquireZone: Zone %lld acquired\n", pos);
                                                  ~~~~              ^~~
                                                  %zu
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixStorageManager.cpp:92:71: warning: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      debug(M_STORAGE_MANAGER, "acquireInode: Inode %lld acquired\n", pos);
                                                    ~~~~              ^~~
                                                    %zu
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixStorageManager.cpp:104:59: warning: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  debug(M_STORAGE_MANAGER, "freeZone: Zone %lld freed\n", index);
                                           ~~~~           ^~~~~
                                           %zu
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
/Users/ghostlyrics/tmp/sweb/common/source/fs/minixfs/MinixStorageManager.cpp:110:61: warning: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  debug(M_STORAGE_MANAGER, "freeInode: Inode %lld freed\n", index);
                                             ~~~~           ^~~~~
                                             %zu
/Users/ghostlyrics/tmp/sweb/utils/exe2minixfs/./kprintf.h:9:77: note: expanded from macro 'debug'
#define debug(flag,fmt,args...) do { if (flag & 0x80000000) { printf(fmt,## args); } } while(0)
                                                                            ^
4 warnings generated.
[ 28%] Building CXX object utils/exe2minixfs/CMakeFiles/exe2minixfs.dir/__/__/common/source/fs/minixfs/StorageManager.cpp.o
Linking CXX executable ../../exe2minixfs
[ 28%] Built target exe2minixfs
Scanning dependencies of target shell.sweb
[ 28%] Building C object userspace/tests/CMakeFiles/shell.sweb.dir/shell.c.o
Linking C executable ../shell.sweb
/usr/local/Cellar/sweb-gcc/4.9.1/lib/gcc/i686-linux-gnu/4.9.1/../../../../i686-linux-gnu/bin/ld: warning: cannot find entry symbol arch_paths_first; defaulting to 0000000008000000
[ 28%] Built target shell.sweb
Scanning dependencies of target arch_common
[ 28%] Building CXX object arch/common/source/CMakeFiles/arch_common.dir/BDManager.cpp.o
[ 29%] Building CXX object arch/common/source/CMakeFiles/arch_common.dir/BDVirtualDevice.cpp.o
[ 31%] Building CXX object arch/common/source/CMakeFiles/arch_common.dir/panic.cpp.o
Linking CXX static library ../../../lib/libarch_common.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../../../lib/libarch_common.a the table of contents is empty (no object file members in the library define global symbols)
[ 31%] Built target arch_common
Scanning dependencies of target arch_x86_common
[ 32%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/8259.cpp.o
[ 33%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/arch_serial_constants.cpp.o
[ 33%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/assert.cpp.o
[ 34%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/ATADriver.cpp.o
[ 35%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/atkbd.cpp.o
[ 36%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/debug_bochs.cpp.o
[ 36%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/IDEDriver.cpp.o
[ 37%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/KeyboardManager.cpp.o
[ 39%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/SerialManager.cpp.o
[ 39%] Building CXX object arch/x86/common/source/CMakeFiles/arch_x86_common.dir/SerialPort.cpp.o
Linking CXX static library ../../../../lib/libarch_x86_common.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../../../../lib/libarch_x86_common.a the table of contents is empty (no object file members in the library define global symbols)
[ 39%] Built target arch_x86_common
Scanning dependencies of target arch_x86_32
[ 39%] Building CXX object arch/x86/32/source/CMakeFiles/arch_x86_32.dir/ArchMemory.cpp.o
[ 40%] Building CXX object arch/x86/32/source/CMakeFiles/arch_x86_32.dir/init_boottime_pagetables.cpp.o
Linking CXX static library ../../../../lib/libarch_x86_32.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: ../../../../lib/libarch_x86_32.a the table of contents is empty (no object file members in the library define global symbols)
[ 40%] Built target arch_x86_32
Scanning dependencies of target arch_x86_32_common
[ 41%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/arch_backtrace.cpp.o
[ 41%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/ArchCommon.cpp.o
[ 42%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/ArchInterrupts.cpp.o
[ 43%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/ArchThreads.cpp.o
[ 43%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/boot.cpp.o
[ 44%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/InterruptUtils.cpp.o
[ 45%] Building CXX object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/SegmentUtils.cpp.o
[ 45%] Building ASM object arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/arch_interrupts.S.o
clang: error: unsupported option '-gstabs2'
make[2]: *** [arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/arch_interrupts.S.o] Error 1
make[1]: *** [arch/x86/32/common/source/CMakeFiles/arch_x86_32_common.dir/all] Error 2
make: *** [all] Error 2

Is it correct that you use the default linker? In my previous comment it says clang: error: unsupported option '-gstabs2' right where the compilation aborts. That leads me to assume that you're using the default linker of the operating system.

these are suspicious...

-- The ASM compiler identification is unknown
-- Warning: Did not find file Compiler/-ASM

i think it uses clang for the asm file instead of gcc...

the warnings also look more like clang... isn't CC set to gcc ?

you could try make VERBOSE=1 to see how/which compiler is called

Verbose log is here: https://gist.github.com/GhostLyrics/7054be9556555c7c87d7

I think that previously cmake used the correct binaries with prefix (e.g. i686-linux-gnu-) and does not in this case.

When I run which gcc I get /usr/bin/gcc which is Apple's version.
When I run which i686-linux-gnu-gcc it goes to /usr/local/bin/i686-linux-gnu-gcc which is the one installed by the package I built.

The gstabs stuff should be fixed (well, kinda... depends if you need stacktraces or not) in the clang_compat_devel branch. I still have to fix the 2 errors that clang complains about but that GCC ignores silently, see the comment by @skogler in #41.

At least on Linux you can just export the cc and cxx environment variable before calling cmake to choose your compiler (cmake honors these variables). Maybe OSX has something similar?

the problem here is that clang is used. it should not be used here.

git bisecting this would be interesting. which commit broke it?

works

For the record:

Fix is in d0e8994: enable_language(ASM) option later in build process; set empty CMAKE_C_LINK_FLAGS flag. Flags were not empty by default on OS X.