I use LSB to produce mathematical modelling libraries: it works very well for this. We do two type of build: production ones that use LSB, and development builds that are built with raw GCC so that they can use some non-LSB stuff, to make the application that serves as test/debug harness nicer to use.
I'm still using LSB 3.1, because we haven't yet dropped support for some older Linuxes that need it, although I'm going to upgrade later this year. I've discovered that I don't have quite the same functionality available from the LSB headers as I do with my raw GCC build. I'd like to get these better aligned. My relevant build commands are: Raw GCC: gcc -m64 -O -fPIC -D _POSIX_SOURCE -c -fexceptions -std=c99 LSB, with the LSB 4.0 SDK: LSBCC_LSBVERSION=3.1 LSBCC_SHAREDLIBS=(a bunch of libraries of our own) /opt/lsb/bin/lsbcc -m64 -O -fPIC -D _POSIX_SOURCE -c -fexceptions -std=c99 Now, I've discovered (rather late) that the LSB build takes no actual notice of the macro _POSIX_SOURCE, because that macro doesn't actually appear in the headers in /opt/lsb/include. It does give me access to some functions that are not available in the GCC build, such as pthread_rwlock_init(). Looking at what seems to be the relevant place in the LSB 3.1 documentation (http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/posixconflicts.html) it seems as though POSIX 2003 conformance is baked into the LSB headers. That seems to be ISO/IEC 9945-1:2003 and possibly its companions of the same date. When I look at glibc's features.h on my development platform, which is SLES11sp1, I seem to need to set _POSIX_C_SOURCE to get conformance to something later than original POSIX, and setting it to 200112L gives me IEEE 1003.1-2004. I'm guessing that this is the same as POSIX 2003 by the dates, but I'm not clear on the relationship between the IEEE and ISO/IEC versions of the standards. So I think if I use gcc -m64 -O -fPIC -D _POSIX_C_SOURCE=200112L -c -fexceptions -std=c99 That gives me everything in the raw-GCC build that I get in the LSB build (plus potentially more stuff that is not LSB-standardised, of course). How wrong am I? thanks, -- John Dallman ----------------- Siemens Industry Software Limited is a limited company registered in England and Wales. Registered number: 3476850. Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
_______________________________________________ lsb-discuss mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/lsb-discuss
