I know that
apt-get source <package_name> gives you the source package. It contains a
debian folder with a file called
rules. If I understand it correctly, this file describes how the source package can be transformed into a
.deb package, including which compiler flags should be used.
- How do I get the compiler flags that are actually used? Is it necessary to run
make -n(if this is even possible) or can I get them somehow by parsing the document(s) ?
- Given the case of a source package from an official repository. Are the compiler flags a 100% determined by the
rulesfile or do they depend on the system that the
.debcreation is done on? Do I need to 'mirror' the official build system to get to the same flags that were used in the official
.debbuilding process? How can I do this?
I learned here, that debian does not have an official policy which compiler flags are used for the .deb-packed binaries.