Date: Thu, 01 Jan 2015 09:46:59 -0700 From: Ian Lepore <ian@freebsd.org> To: lev@FreeBSD.org Cc: ports@FreeBSD.org, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: CFLAGS only for clang in mixed-compiler project? Message-ID: <1420130819.85983.2.camel@freebsd.org> In-Reply-To: <54A56F56.60403@FreeBSD.org> References: <54A56F56.60403@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2015-01-01 at 19:01 +0300, Lev Serebryakov wrote: > I'm trying to update arm-eabi (microcontroller) cross-gcc port to > latest version 4.9 and have one weird problem. > > Some part of gcc for arm (neon coprocessor machine description, to be > precise) requires more than 256 nested parenthesis in version 4.9 (4.8 > doesn't have this problem). Due to this parenthesis madness clang > needs "-fbracket-depth=1024" option. If I add this option to CFLAGS in > environment variable, I have other problem. Later in build process gcc > uses newly-built gcc (xgcc) to build library. And this gcc picks up > "-fbracket-depth=1024" from environment and fails due to unknown option! > > How could I provide options only for clang but not for gcc? Don't set it in the env, set it in a make variable. The devel/arm-none-eabi-gcc port (which builds a bare-metal arm cross compiler and may be exactly what you need) has this: .include <bsd.port.options.mk> # The following is required for clang to bootstrap gcc. .if ${COMPILER_TYPE} == clang MAKE_ARGS+= CXXFLAGS=-fbracket-depth=512 .endif -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1420130819.85983.2.camel>