Opened 6 years ago
Last modified 6 years ago
#793 new defect
Clang build broken
Reported by: | Jiri Svoboda | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | helenos/unspecified | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
As of current master Clang build fails. It is due to -Werror
and warnings are generated about macros being re-defined. This happens because of the following reason.
We switched from providing our own freestanding environment headers to using the ones provided by the compiler. With Clang compiling with -cstd=gnuxx
and {-freestanding}}} standard freestanding headers such as stddef.h
will expose UNIX extensions such as SSIZE_MAX macro. Those will collide with our own definitions of those macros.
Un-defining the macros first as a work around does not help because sometimes our header is included before Clang's header and Clang does not undefine the macros first.
Not sure if this is a bug in Clang or in HelenOS. Should Clang not expose these macros in freestanding mode? Or is this something something the compiler simply does not have an interface for asking us to do (compile with GNU extensions such as assembler, but without defining GNU macros?) Do we need to file a bug with Clang or do something else, perhaps go back to defining our own freestanding environment?
Also it seems the Clang build invokes g++ instead of
[/usr/local/cross/bin/xxx-]clang++