Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unix C++ compilers that do not understand -c -o

Autoconf/Automake are at pains to support ancient C compilers that didn't understand the simultaneous use of the -c and -o options (create an object file with this name). There's AM_PROG_CC_C_O and a special wrapper script, and the Automake manual warns you to use them if you want to use subdir-objects mode.

There isn't an AM_PROG_CXX_C_O. It is not hard to modify AM_PROG_CC_C_O to test the C++ compiler instead, but I wonder if it's necessary. Was there ever a Unix C++ compiler (Cfront, maybe?) that didn't support simultaneous use of -c and -o? Come to that, just how old are the C compilers that don't support it -- was there ever a C89-supporting compiler with this problem, for instance?

like image 743
zwol Avatar asked Nov 25 '11 18:11

zwol


1 Answers

There are compilers, mainly those targeted at the embedded industry, where you must manually compile and link. In those cases, the -c option does not make sense.

Given that Linux is more and more used in embedded systems, you should definitely take those into account.

like image 68
Lindydancer Avatar answered Oct 16 '22 04:10

Lindydancer