Page MenuHomeFreeBSD

Pass the full CFLAGS to cpp for MKlib_gen.sh.
ClosedPublic

Authored by jhb on Jul 19 2020, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 8 2024, 10:01 AM
Unknown Object (File)
Oct 4 2024, 1:31 AM
Unknown Object (File)
Sep 23 2024, 7:09 AM
Unknown Object (File)
Sep 17 2024, 12:12 AM
Unknown Object (File)
Sep 5 2024, 4:32 PM
Unknown Object (File)
Sep 5 2024, 3:19 PM
Unknown Object (File)
Sep 5 2024, 6:25 AM
Unknown Object (File)
Sep 4 2024, 5:19 PM
Subscribers

Details

Summary

GCC's cpp was exiting when it failed to find requested includes
(<ncurses_cfg.h> and <ncurses_defs.h>). clang-cpp just silently
ignored the missing header files (thus not honoring any macros
defined in those).

Test Plan
  • build worlds with amd64-gcc and aarch64-gcc which failed to link lldb since libc_gen.c was empty and lldb links against box()

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32421
Build 29898: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jul 19 2020, 8:47 PM
jhb created this revision.

This is a regression introduced earlier this year in an ncurses upgrade when this was switched to using CPP + CPPFLAGS (which is always empty) instead of CC + CFLAGS (which the other generated files still use?). The fact that clang-cpp silently fails and ignores errors seems like a bug in clang-cpp to me.

kevans added a subscriber: kevans.

LGTM and explains what I had observed when looking at this a couple weeks ago.

This revision is now accepted and ready to land.Aug 3 2020, 4:27 PM
This revision was automatically updated to reflect the committed changes.