[packages/hfsplus-tools] - pl, pass CFLAGS and LDFLAGS (no CC, as it must be clang because of Blocks extension)

Elan Ruusamäe glen at pld-linux.org
Tue Mar 19 17:36:49 CET 2013


On 17.03.2013 09:10, qboosh wrote:
>   %build
> -export CFLAGS="%{rpmcflags}"
> -%{__make}
> +# note: keep CC=clang, not %{__cc}
> +%{__make} \
> +	CFLAGS="%{rpmcflags} -fblocks -Wall -I$(pwd)/BlocksRunTime -I$(pwd)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -DLINUX=1 -DBSD=1 -DVERSION=\\\"%{version}\\\"" \
> +	LDFLAGS="%{rpmldflags} -L$(pwd)/BlocksRunTime"
wouldn't in such cases when you overwrite make variable, do a patch and 
write it into new variable (say OPTFLAGS), because copying existing 
CFLAGS contents to spec is source of mistakes with next code release. 
pld developers are lazy and check if CFLAGS has changed in Makefile only 
if there's some obvious error (compile fails).

make OPTPFAGS="%{rpmcflags}"

also if you ass CFLAGS as env, not make parameter, makefiles can 
CFLAGS+=something, and not needing to copy that contents to .spec

CFLAGS="%{rpmcflags}" make

-- 
glen



More information about the pld-devel-en mailing list