tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pcc and build system
On Mon, 07 Jul 2008, Gregory McGarry wrote:
> How should alternative compilers be integrated into the build system?
> Can patches like the one below be sprinkled round the the build tree
> and bsd.own.mk changed later to define HAVE_PCC?
In general, it would be nice if changes could be centralised, such as by
adding appropriate macros to <sys/cdefs.h>, and having other code use
such macros. I don't mind seeing a maze of #if (this_compiler) && !
(that_compiler) || (other_compiler) in sys/cdefs.h, but I don't want to
see it replicated in many Makefiles or other headers.
> +.if defined(HAVE_PCC)
> +CPPFLAGS+= -D_U_=""
> +.elif defined(HAVE_GCC)
> CPPFLAGS+= -D_U_="__attribute__((unused))"
> +.endif
In this particular case, <sys/cdefs.h> already defines "__unused", and
I think code that makes direct use of __attribute__((unused)) should be
changed to use __unused instead.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index