Hi Rainer,
This patch looks OK.
Thanks,
Balaji V. Iyer.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Rainer
Orth
Sent: Thursday, October 31, 2013 10:02 AM
To: Jakub Jelinek
Cc: Iyer, Balaji V; Gerald Pfeifer; Jeff Law; [email protected]
Subject: Re: [PATCH] RE: libcilkrts/runtime/config/generic/cilk-abi-vla.c
failure
Jakub Jelinek <[email protected]> writes:
> On Thu, Oct 31, 2013 at 01:32:19PM +0000, Iyer, Balaji V wrote:
>> > It is not just about not including 3, but also the []s in
>> > configure.ac were eaten by m4. In any case, shouldn't you fix also
>> > config/generic?
>> >
>>
>> I am in the process of fixing config/generic. I also replaced [456]
>> with i?86. That should work fine right?
>
> Yes.
Even with that change, i386-pc-solaris2.11 bootstrap is broken in libcilkrts in
two different ways:
* Configuring the library fails for the 64-bit multilib: config.log
shows
configure:3105: checking whether the C++ compiler works
configure:3114: ./a.out
ld.so.1: a.out: fatal:
/var/gcc/regression/trunk/11-gcc/build/./gcc/libgcc_s.so.1: wrong ELF class:
ELFCLASS32
/vol/gcc/src/hg/trunk/local/libcilkrts/configure[3116]: eval: line 1: 4955:
Killed
configure:3118: $? = 265
configure:3125: error: in
`/var/gcc/regression/trunk/11-gcc/build/i386-pc-solaris2.11/amd64/libcilkrts':
configure:3127: error: cannot run C++ compiled programs.
There's no 64-bit libgcc_s.so.1 installed in the runtime linker's
default search path, and toplevel Makefile (via RPATH_ENVVAR) only
takes care of the default multilib. This is also reported for the
libgcj case in PR other/43445.
* Even after setting LD_LIBRARY_PATH_64 to work around this,
compilation fails for os-unix.c:
/vol/gcc/src/hg/trunk/local/libcilkrts/runtime/os-unix.c:66:5: error: #error
"Unsupported OS"
# error "Unsupported OS"
^
/vol/gcc/src/hg/trunk/local/libcilkrts/runtime/os-unix.c: In function
'__cilkrts_hardware_cpu_count':
/vol/gcc/src/hg/trunk/local/libcilkrts/runtime/os-unix.c:378:2: error: #error
"Unknown architecture"
#error "Unknown architecture"
^
/vol/gcc/src/hg/trunk/local/libcilkrts/runtime/os-unix.c: In function
'__cilkrts_yield':
/vol/gcc/src/hg/trunk/local/libcilkrts/runtime/os-unix.c:411:5: warning:
implicit declaration of function 'pthread_yield'
[-Wimplicit-function-declaration]
pthread_yield();
^
make[2]: *** [os-unix.lo] Error 1
The following patch fixes this:
2013-10-31 Rainer Orth <[email protected]>
* runtime/os-unix.c [__sun__ && __svr4__]: Include <sched.h>.
(__cilkrts_hardware_cpu_count) [__sun__ && __svr4__]: Use sysconf.
(__cilkrts_yield) [__sun__ && __svr4__]: Use sched_yield.