Skip to content

Fix CC passing in Makefile.am - #1540

Merged
linas merged 1 commit into
opencog:masterfrom
wishstudio:master
May 9, 2026
Merged

linas merged 1 commit into
opencog:masterfrom
wishstudio:master

Conversation

@wishstudio

@wishstudio wishstudio commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Depending on autoconf and system compiler version, AC_PROG_CC sometimes inserts compiler flags into the CC variable, making CC not a single word. For example, on autoconf 2.73 and clang 21.18 I got CC="clang -std=gnu23". This peculiar semantic breaks the CC string injection resulting in compilation error:

In file included from <built-in>:409:
<command line>:60:12: warning: missing terminating '"' character [-Winvalid-pp-token]
   60 | #define CC "clang
      |            ^
config.c:126:26: error: expected ';' after return statement
  126 |         return "Compiled with: " LG_COMP "\n"
      |                                 ^
      |                                 ;
1 warning and 1 error generated.

This PR changes the CC passing to only pass the first word of the CC string, fixing this issue.

@linas
linas merged commit 718efa1 into opencog:master May 9, 2026
1 check passed
@linas

linas commented May 9, 2026

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants