Ralph Corderoy
2006-Apr-17 15:17 UTC
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
Hi again, I wrote:> > I would like to test but the I modigied the configure to make > > unknown = OpenBSD and Unix > > Have you looked at ./config.log. ./configure creates this as it runs > as a trace of the path it took through ./configure. Work backwards > from the end to find out what it didn't like.I remember SourceForge's compile farm has an OpenBSD x86 machine so thought I'd give it a go with a recent CVS check-out. $ ./configure configure: WARNING: Unknown project (HowToUseJIT) won't be configured automatically configure: WARNING: Unknown project (ModuleMaker) won't be configured automatically configure: WARNING: Unknown project (SmallExamples) won't be configured automatically checking build system type... i386-unknown-openbsd3.8 checking host system type... i386-unknown-openbsd3.8 checking target system type... i386-unknown-openbsd3.8 checking type of operating system we're on... Unknown configure: error: Operating system is unknown, configure can't continue LLVM's configure.ac has a hard-coded list of supported platforms, which is a shame, and `openbsd' isn't in it. [case $build in *-*-aix*) llvm_cv_os_type="AIX" llvm_cv_platform_type="Unix" ;; ... *-*-freebsd*) llvm_cv_os_type="FreeBSD" llvm_cv_platform_type="Unix" ;; So I forged `freebsd' $ ./configure --build=i386-unknown-freebsd3.8 and ./configure completed successfully. gmake stopped with llvm[1]: Compiling Mutex.cpp for Debug build Mutex.cpp:55: warning: the address of `int pthread_mutex_init(volatile pthread_mutex**, pthread_mutex_attr* const*)', will always be `true' Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': Mutex.cpp:80: error: `pthread_mutexattr_setpshared' undeclared (first use this function) Mutex.cpp:80: error: (Each undeclared identifier is reported only once for each function it appears in.) 78 #ifndef __FreeBSD__ 79 // Make it a process local mutex 80 errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); 81 #endif So I modified both occurrences of __FreeBSD__ to also check for __OpenBSD__. The next problem was INT8_MAX, etc., weren't being defined. include/llvm/Support/DataTypes.h.in is inadequate for this platform. I dumped a set of definitions into each file that wanted them as a bodge. Better autoconf tests could set up INT8_MAX, etc., on all platforms that don't define them. After that, the build completed and I could run llvm-{as,dis} and lli. So with a little work, OpenBSD looks like it could be supported out of the box. I've only a low-bandwidth Internet connection at the moment so it won't be by me but is there a `how to submit a patch for LLVM' document somewhere? Cheers, Ralph.
Jeff Cohen
2006-Apr-17 17:58 UTC
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
I just added __OpenBSD__ everywhere __FreeBSD__ was being tested (there were about a dozen places). I suspect we'll have to add one for NetBSD also one day (even DragonflyBSD?). INT8_MAX and friends ought to be declared by <stdint.h>. It is on FreeBSD. Ralph Corderoy wrote:>Hi again, > >I wrote: > > >>>I would like to test but the I modigied the configure to make >>>unknown = OpenBSD and Unix >>> >>> >>Have you looked at ./config.log. ./configure creates this as it runs >>as a trace of the path it took through ./configure. Work backwards >>from the end to find out what it didn't like. >> >> > >I remember SourceForge's compile farm has an OpenBSD x86 machine so >thought I'd give it a go with a recent CVS check-out. > > $ ./configure > configure: WARNING: Unknown project (HowToUseJIT) won't be configured automatically > configure: WARNING: Unknown project (ModuleMaker) won't be configured automatically > configure: WARNING: Unknown project (SmallExamples) won't be configured automatically > checking build system type... i386-unknown-openbsd3.8 > checking host system type... i386-unknown-openbsd3.8 > checking target system type... i386-unknown-openbsd3.8 > checking type of operating system we're on... Unknown > configure: error: Operating system is unknown, configure can't continue > >LLVM's configure.ac has a hard-coded list of supported platforms, which >is a shame, and `openbsd' isn't in it. > > [case $build in > *-*-aix*) > llvm_cv_os_type="AIX" > llvm_cv_platform_type="Unix" ;; > ... > *-*-freebsd*) > llvm_cv_os_type="FreeBSD" > llvm_cv_platform_type="Unix" ;; > >So I forged `freebsd' > > $ ./configure --build=i386-unknown-freebsd3.8 > >and ./configure completed successfully. gmake stopped with > > llvm[1]: Compiling Mutex.cpp for Debug build > Mutex.cpp:55: warning: the address of `int pthread_mutex_init(volatile > pthread_mutex**, pthread_mutex_attr* const*)', will always be `true' > Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': > Mutex.cpp:80: error: `pthread_mutexattr_setpshared' undeclared (first use this > function) > Mutex.cpp:80: error: (Each undeclared identifier is reported only once for each > function it appears in.) > > 78 #ifndef __FreeBSD__ > 79 // Make it a process local mutex > 80 errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); > 81 #endif > >So I modified both occurrences of __FreeBSD__ to also check for >__OpenBSD__. > >The next problem was INT8_MAX, etc., weren't being defined. >include/llvm/Support/DataTypes.h.in is inadequate for this platform. I >dumped a set of definitions into each file that wanted them as a bodge. >Better autoconf tests could set up INT8_MAX, etc., on all platforms that >don't define them. > >After that, the build completed and I could run llvm-{as,dis} and lli. > >So with a little work, OpenBSD looks like it could be supported out of >the box. I've only a low-bandwidth Internet connection at the moment so >it won't be by me but is there a `how to submit a patch for LLVM' >document somewhere? > >Cheers, > > >Ralph. > > >_______________________________________________ >LLVM Developers mailing list >LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > >
Joseph Altea
2006-Apr-18 03:58 UTC
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
I'll Check it out.. is it in the CVS or the release yet.. or how do I apply a patch to it... thanks much for the update.. I'll feel better about the whole thing..OpenBSD is really nice with the pro-police stack and would like to see an alternative to the GCC only compiler chain of tools especially as it is based on a somewhat archaic optiminzation backend and procedural stuff is pretty dated in the RTL layer.. Aho and Ullman can only take you so far.. Then you need to use the FORCE.. LUKE use the force.. of llvm that is. :) cheers all. Jeff Cohen <jeffc at jolt-lang.org> wrote: I just added __OpenBSD__ everywhere __FreeBSD__ was being tested (there were about a dozen places). I suspect we'll have to add one for NetBSD also one day (even DragonflyBSD?). INT8_MAX and friends ought to be declared by . It is on FreeBSD. Ralph Corderoy wrote:>Hi again, > >I wrote: > > >>>I would like to test but the I modigied the configure to make >>>unknown = OpenBSD and Unix >>> >>> >>Have you looked at ./config.log. ./configure creates this as it runs >>as a trace of the path it took through ./configure. Work backwards >>from the end to find out what it didn't like. >> >> > >I remember SourceForge's compile farm has an OpenBSD x86 machine so >thought I'd give it a go with a recent CVS check-out. > > $ ./configure > configure: WARNING: Unknown project (HowToUseJIT) won't be configured automatically > configure: WARNING: Unknown project (ModuleMaker) won't be configured automatically > configure: WARNING: Unknown project (SmallExamples) won't be configured automatically > checking build system type... i386-unknown-openbsd3.8 > checking host system type... i386-unknown-openbsd3.8 > checking target system type... i386-unknown-openbsd3.8 > checking type of operating system we're on... Unknown > configure: error: Operating system is unknown, configure can't continue > >LLVM's configure.ac has a hard-coded list of supported platforms, which >is a shame, and `openbsd' isn't in it. > > [case $build in > *-*-aix*) > llvm_cv_os_type="AIX" > llvm_cv_platform_type="Unix" ;; > ... > *-*-freebsd*) > llvm_cv_os_type="FreeBSD" > llvm_cv_platform_type="Unix" ;; > >So I forged `freebsd' > > $ ./configure --build=i386-unknown-freebsd3.8 > >and ./configure completed successfully. gmake stopped with > > llvm[1]: Compiling Mutex.cpp for Debug build > Mutex.cpp:55: warning: the address of `int pthread_mutex_init(volatile > pthread_mutex**, pthread_mutex_attr* const*)', will always be `true' > Mutex.cpp: In constructor `llvm::sys::Mutex::Mutex(bool)': > Mutex.cpp:80: error: `pthread_mutexattr_setpshared' undeclared (first use this > function) > Mutex.cpp:80: error: (Each undeclared identifier is reported only once for each > function it appears in.) > > 78 #ifndef __FreeBSD__ > 79 // Make it a process local mutex > 80 errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE); > 81 #endif > >So I modified both occurrences of __FreeBSD__ to also check for >__OpenBSD__. > >The next problem was INT8_MAX, etc., weren't being defined. >include/llvm/Support/DataTypes.h.in is inadequate for this platform. I >dumped a set of definitions into each file that wanted them as a bodge. >Better autoconf tests could set up INT8_MAX, etc., on all platforms that >don't define them. > >After that, the build completed and I could run llvm-{as,dis} and lli. > >So with a little work, OpenBSD looks like it could be supported out of >the box. I've only a low-bandwidth Internet connection at the moment so >it won't be by me but is there a `how to submit a patch for LLVM' >document somewhere? > >Cheers, > > >Ralph. > > >_______________________________________________ >LLVM Developers mailing list >LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > >_______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev --------------------------------- To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060418/6aad1ce8/attachment.html>
Ralph Corderoy
2006-Apr-18 10:01 UTC
[LLVMdev] OpenBSD. (Was: 1.7 Pre-Release Ready for Testing)
Hi Jeff,> I just added __OpenBSD__ everywhere __FreeBSD__ was being tested > (there were about a dozen places). I suspect we'll have to add one > for NetBSD also one day (even DragonflyBSD?).Thanks. Although it would be better to come up with a autoconf test for the feature than keep maintaining the #ifdefs, etc.> INT8_MAX and friends ought to be declared by <stdint.h>. It is on > FreeBSD.That file doesn't exist on this OpenBSD 3.8 installation. And that symbol doesn't exist under /usr/include. I guess it's not uncommon given things like http://autoconf-archive.cryp.to/ax_create_stdint_h.html Cheers, Ralph.