[LLVMbugs] [Bug 2629] New: llvm-gcc won't build on linux

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Aug 3 07:37:54 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2629

           Summary: llvm-gcc won't build on linux
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


It's not immediately clear to me whether this is due to a miscompiled xgcc or a
change in the implementation of atomic primitives in Apple's gcc. Either way,
here's the compile failure:

/usr/local/google/home/nlewycky/llvm-gcc/build/./gcc/xgcc
-B/usr/local/google/home/nlewycky/llvm-gcc/build/./gcc/
-B/usr/local/google/home/nlewycky/llvm-gcc/install/i686-pc-linux-gnu/bin/
-B/usr/local/google/home/nlewycky/llvm-gcc/install/i686-pc-linux-gnu/lib/
-isystem
/usr/local/google/home/nlewycky/llvm-gcc/install/i686-pc-linux-gnu/include
-isystem
/usr/local/google/home/nlewycky/llvm-gcc/install/i686-pc-linux-gnu/sys-include
-DHAVE_CONFIG_H -I. -I../../../src/libgomp -I.
-I../../../src/libgomp/config/linux/x86 -I../../../src/libgomp/config/linux
-I../../../src/libgomp/config/posix -I../../../src/libgomp -Wall -Werror
-ftls-model=initial-exec -march=i486 -pthread -mtune=i686 -O2 -g -O2 -MT
alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../src/libgomp/alloc.c -o alloc.o
In file included from ../../../src/libgomp/libgomp.h:50,
                 from ../../../src/libgomp/alloc.c:32:
../../../src/libgomp/config/linux/sem.h: In function 'gomp_sem_wait':
../../../src/libgomp/config/linux/sem.h:45: error: incompatible type for
argument 1 of '__sync_bool_compare_and_swap'
../../../src/libgomp/config/linux/sem.h: In function 'gomp_sem_post':
../../../src/libgomp/config/linux/sem.h:52: error: incompatible type for
argument 1 of '__sync_bool_compare_and_swap'
In file included from ../../../src/libgomp/libgomp.h:51,
                 from ../../../src/libgomp/alloc.c:32:
../../../src/libgomp/config/linux/mutex.h: In function 'gomp_mutex_lock':
../../../src/libgomp/config/linux/mutex.h:47: error: incompatible type for
argument 1 of '__sync_bool_compare_and_swap'
../../../src/libgomp/config/linux/mutex.h: In function 'gomp_mutex_unlock':
../../../src/libgomp/config/linux/mutex.h:54: error: incompatible type for
argument 1 of '__sync_lock_test_and_set'
make[4]: *** [alloc.lo] Error 1
make[4]: Leaving directory
`/usr/local/google/home/nlewycky/llvm-gcc/build/i686-pc-linux-gnu/libgomp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/usr/local/google/home/nlewycky/llvm-gcc/build/i686-pc-linux-gnu/libgomp'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/usr/local/google/home/nlewycky/llvm-gcc/build/i686-pc-linux-gnu/libgomp'
make[1]: *** [all-target-libgomp] Error 2
make[1]: Leaving directory `/usr/local/google/home/nlewycky/llvm-gcc/build'
make: *** [all] Error 2

The code it's complaining about looks like this:

extern void gomp_mutex_lock_slow (gomp_mutex_t *mutex);
static inline void gomp_mutex_lock (gomp_mutex_t *mutex)
{
  if (!__sync_bool_compare_and_swap (mutex, 0, 1))
    gomp_mutex_lock_slow (mutex);
}

and those __sync* functions are defined here:
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list