MantisBT - CMake
View Issue Details
0011700CMakeModulespublic2011-01-14 12:292011-01-31 16:05
Brian Lewis 
Brad King 
normalminoralways
closedfixed 
SCO UNIXOpenServer 5.0.x
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011700: SCO: GNU compiler not supported
$ CC=/usr/local/gcc-3.3.1/bin/gcc CXX=/usr/local/gcc-3.3.1/bin/g++ ./bootstrap && make

eventually fails with

gcc: `-b' must come at the start of the command line

because the flags set in Modules/Platform/SCO_SV.cmake are only appropriate for the default SCO compiler.
The attached patch fixes the issue for me. Thanks.
No tags attached.
patch sco-gcc.patch (922) 2011-01-14 12:29
https://public.kitware.com/Bug/file/3624/sco-gcc.patch
patch sco-gcc-r2.patch (790) 2011-01-14 14:03
https://public.kitware.com/Bug/file/3625/sco-gcc-r2.patch
patch 28a0403c+0001-Recognize-SCO-UnixWare-C-C-compilers-11700.patch (1,402) 2011-01-17 09:59
https://public.kitware.com/Bug/file/3634/28a0403c%2B0001-Recognize-SCO-UnixWare-C-C-compilers-11700.patch
patch 28a0403c+0002-Factor-SCO-compiler-info-out-of-platform-file-11700.patch (2,747) 2011-01-17 10:00
https://public.kitware.com/Bug/file/3635/28a0403c%2B0002-Factor-SCO-compiler-info-out-of-platform-file-11700.patch
Issue History
2011-01-14 12:29Brian LewisNew Issue
2011-01-14 12:29Brian LewisFile Added: sco-gcc.patch
2011-01-14 12:56Brad KingAssigned To => Brad King
2011-01-14 12:56Brad KingStatusnew => assigned
2011-01-14 12:56Brad KingSummarybootstrap fails when using gcc, g++ => SCO: GNU compiler not supported
2011-01-14 13:05Brad KingNote Added: 0024681
2011-01-14 13:31Brad KingNote Added: 0024683
2011-01-14 13:55Brad KingNote Added: 0024689
2011-01-14 14:03Brian LewisNote Added: 0024691
2011-01-14 14:03Brian LewisFile Added: sco-gcc-r2.patch
2011-01-14 14:11Brad KingNote Added: 0024692
2011-01-14 14:17Brian LewisNote Added: 0024693
2011-01-17 09:59Brad KingFile Added: 28a0403c+0001-Recognize-SCO-UnixWare-C-C-compilers-11700.patch
2011-01-17 10:00Brad KingFile Added: 28a0403c+0002-Factor-SCO-compiler-info-out-of-platform-file-11700.patch
2011-01-17 10:01Brad KingNote Added: 0024749
2011-01-17 10:22Brian LewisNote Added: 0024751
2011-01-17 10:36Brad KingNote Added: 0024753
2011-01-17 10:36Brad KingStatusassigned => closed
2011-01-17 10:36Brad KingResolutionopen => fixed
2011-01-31 16:05David ColeFixed in Version => CMake 2.8.4
2011-01-31 16:05David ColeTarget Version => CMake 2.8.4

Notes
(0024681)
Brad King   
2011-01-14 13:05   
What is the default compiler on SCO? Perhaps:

  http://predef.sourceforge.net/precomp.html#sec45 [^]

?
(0024683)
Brad King   
2011-01-14 13:31   
http://osr600doc.sco.com/en/manCP/cc.CP.html [^]
http://osr600doc.sco.com/en/manCP/CC.CP.html [^]
(0024689)
Brad King   
2011-01-14 13:55   
I'd like to identify the native SCO compiler and then move the options for it over to Modules/Compiler/SCO-<lang>.cmake or something like that. Then they won't be in the SCO_SV platform file at all and the normal GNU compiler rules from Platform/Compiler/GNU* should work.
(0024691)
Brian Lewis   
2011-01-14 14:03   
I'm not sure what information you want about the native SCO compiler. Please let me know and I'll try to get it for you.

In the meantime, I'll attach a revised version of the patch.
(0024692)
Brad King   
2011-01-14 14:11   
The SCO_SV file is leftover from an outdated platform file layout design that mixed together the platform (operating system) and compiler. Most of the files have been refactored out to put compiler-specific information in modules called

  Compiler/<id>-<lang>.cmake

platform information like the preferred shared library extension in

  Platform/<os>.cmake

and platform-specific compiler information in

  Platform/<os>-<id>-<lang>.cmake

This all depends on having an "<id>" for each compiler vendor that is recognized in Modules/CMakeCCompilerId.c.in and Modules/CMakeCXXCompilerId.cpp.in.

The reason you are having trouble is that the Platform/SCO_SV.cmake file still contains compiler-specific information for one particular compiler. Rather than adding more compiler-specific information to it for more compilers we should take out the SCO compiler information and put it in the right place. Then it won't interfere with other compilers on that platform.

I need to know the official vendor's name for the default compiler and the preprocessor symbol that identifies it. From the above-linked man pages I think this is

  SCO UnixWare C/C++ Compiler
  __SCO_VERSION__

Correct?
(0024693)
Brian Lewis   
2011-01-14 14:17   
I think that information is correct. Thanks.
(0024749)
Brad King   
2011-01-17 10:01   
Please apply the attached patches:

  28a0403c+0001-Recognize-SCO-UnixWare-C-C-compilers-11700.patch
  28a0403c+0002-Factor-SCO-compiler-info-out-of-platform-file-11700.patch

The GNU compiler should then be able to work.
(0024751)
Brian Lewis   
2011-01-17 10:22   
Brad, it seems to work. Thank you!
(0024753)
Brad King   
2011-01-17 10:36   
Thanks for testing:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db05da35 [^]
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e60c8ec6 [^]