[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Changing a macro in a spec file?

I'm trying to build an Redhat-hosted mingw-targeted cross-compiler using
a spec file that worked on Redhat 8.0, but no longer does.

After processing the %install section, rpm tries to run the various
install_post macros as defined in the appropriate macros file (in
/usr/lib/rpm/*-redhat-linux/macros, where * is the host processor type).
In Redhat 9, the __os_install_post macro runs the script
/usr/lib/rpm/brp-strip-static-archive, which runs strip on the files
stored in any static libraries in the built and installed tree.
This script was not present in Redhat 8.0.

When brp-strip-static-archive tries to strip the object files stored in
the libraries, it gives an error like the following:

strip: /var/tmp/crossmingw32-platform-3.0-root-dpw/usr/i586-mingw32/lib/
stECbvpm/dt.o: Invalid operation

This is understandable, as the native-hosted strip command is not compiled
to strip Windows COFF object files.  However, this makes packaging any
cross-compiled static libraries created by building a source rpm file
impossible, since the script will exit with an error indication when
trying to strip the object files.

So, after my long-winded explanation:  Is there a way to modify the
%__spec_install_post macro in the spec file to eliminate the use of
brp-strip-static-archive?   Or is there some other way to indicate that
some or all of the files under RPM_BUILD_ROOT should not be stripped
by the script?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []