Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 5 months ago

Last modified 5 months 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?

Change History (1)

comment:1 Changed 5 months ago by Jiri Svoboda

Also it seems the Clang build invokes g++ instead of [/usr/local/cross/bin/xxx-]clang++

Note: See TracTickets for help on using tickets.