<p dir="ltr"><br>
On Sep 13, 2015 4:07 PM, "Reindl Harald" <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>> wrote:<br>
><br>
><br>
><br>
> Am 13.09.2015 um 16:01 schrieb arnaud gaboury:<br>
>><br>
>> On Sun, Sep 13, 2015 at 3:53 PM, Reindl Harald <<a href="mailto:h.reindl@thelounge.net">h.reindl@thelounge.net</a>> wrote:<br>
>>>><br>
>>>> export CFFLAGS= '-xHost -mavx -fp-model precise'<br>
>>>> %configure<br>
>>>> CFFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \<br>
>>>> ........<br>
>>>><br>
>>>> Is above the the best way?<br>
>>><br>
>>><br>
>>><br>
>>> no<br>
>>><br>
>>> * there is no reason to mention CFLAGS in %configure again<br>
>>> * you don't want the default macro at the end because<br>
>>> it would probably override your overrides<br>
>>> * export CFFLAGS="%optflags -xHost -mavx -fp-model precise"<br>
>><br>
>><br>
>> Got it. Found this way in /usr/lib/rpm/macros file:<br>
><br>
><br>
> well, that below defines the default %configure macro which you want to override which can be replaced / overriden in ~/.rpm macros</p>
<p dir="ltr">OK. Thank you. It is clear then<br></p>
<p dir="ltr">><br>
> [builduser@testserver:~]$ cat .rpmmacros<br>
> %_topdir %(echo $HOME)/rpmbuild<br>
> %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot<br>
><br>
> %dist .fc22.%(echo $(/bin/date +%Y%m%d)).rh<br>
> %fedora 22<br>
> %fc22 1<br>
> %packager Reindl Harald<br>
> %vendor thelounge interactive design<br>
> %_smp_mflags -j10<br>
> %_include_minidebuginfo 0<br>
> %_binary_payload w1.gzdio<br>
> %_source_payload w1.gzdio<br>
> %__global_ldflags -Wl,-z,now -Wl,-z,relro,-z,noexecstack<br>
><br>
><br>
> %configure \<br>
> CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS; \<br>
> CXXFLAGS="${CXXFLAGS:-%optflags}"; export CXXFLAGS; \<br>
> FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}"; export FFLAGS; \<br>
> FCFLAGS="${FCFLAGS:-%optflags -I%_fmoddir}"; export FCFLAGS; \<br>
> LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \<br>
> ./configure \\\<br>
> --host=x86_64-redhat-linux \\\<br>
> --build=x86_64-redhat-linux \\\<br>
> --target=x86_64-redhat-linux \\\<br>
> --program-prefix=%{?_program_prefix} \\\<br>
> --disable-dependency-tracking \\\<br>
> --prefix=%{_prefix} \\\<br>
> --exec-prefix=%{_exec_prefix} \\\<br>
> --bindir=%{_bindir} \\\<br>
> --sbindir=%{_sbindir} \\\<br>
> --sysconfdir=%{_sysconfdir} \\\<br>
> --datadir=%{_datadir} \\\<br>
> --includedir=%{_includedir} \\\<br>
> --libdir=%{_libdir} \\\<br>
> --libexecdir=%{_libexecdir} \\\<br>
> --localstatedir=%{_localstatedir} \\\<br>
> --sharedstatedir=%{_sharedstatedir} \\\<br>
> --mandir=%{_mandir} \\\<br>
> --infodir=%{_infodir}<br>
><br>
><br>
><br>
>> ....<br>
>> # ---- specfile macros.<br>
>> # Macro(s) here can be used reliably for reproducible builds.<br>
>> # (Note: Above is the goal, below are the macros under development)<br>
>> #<br>
>> # The configure macro runs autoconf configure script with platform specific<br>
>> # directory structure (--prefix, --libdir etc) and compiler flags<br>
>> # such as CFLAGS.<br>
>> #<br>
>> # The configure macro should be invoked as %configure (rather than %{configure})<br>
>> # because the rest of the arguments will be expanded using %*.<br>
>> #<br>
>> %_configure ./configure<br>
>> %configure \<br>
>> CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \<br>
>> CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \<br>
>> FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \<br>
>> %{_configure} --host=%{_host} --build=%{_build} \\\<br>
><br>
><br>
><br>
> --<br>
> devel mailing list<br>
> <a href="mailto:devel@lists.fedoraproject.org">devel@lists.fedoraproject.org</a><br>
> <a href="https://admin.fedoraproject.org/mailman/listinfo/devel">https://admin.fedoraproject.org/mailman/listinfo/devel</a><br>
> Fedora Code of Conduct: <a href="http://fedoraproject.org/code-of-conduct">http://fedoraproject.org/code-of-conduct</a><br>
</p>