Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jan 2015 11:36:38 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Lev Serebryakov <lev@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: CFLAGS only for clang in mixed-compiler project?
Message-ID:  <Pine.GSO.4.64.1501011133360.18834@sea.ntplx.net>
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, 1 Jan 2015, Lev Serebryakov wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
>
> 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?

Hmm, I found CFLAGS.clang (or rather CFLAGS.${COMPILER_TYPE})
in /usr/share/mk/, so you might try setting that instead of
just CFLAGS.  Just a guess...

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1501011133360.18834>