debug the environment used by make and port gcc from source

I know how to build gcc from source, what I still have to figure out is what are the exact environmental variables used by gcc when configure and building gcc itself, I'm actually trying to build the compiler from source using another version of gcc with different ABI.

Any idea on how to get this kind of information beside "try to grep all the variable that starts with $ inside all makefiles and configuration files" ?

Answers


You can see a list of Environment Variables Affecting GCC.

To create a completly independent gcc with a new toolset, have a look at LFS, they explain how to build gcc from an existing OS for a future OS.

There is also a page about building gcc, which talks about BOOT_CFLAGS='-O' and CFLAGS_FOR_TARGET and STAGE1_TFLAGS and BUILD_CONFIG. There is also some additional variables for cross-compiling and ada compiler.


Need Your Help

Issues with Searching ListView (Android)

java android listview

I have been having trouble trying to get my Searchbox working to search the Listview for appropriate rows, and then displaying as required.

Best way to import large excel file into SQL Server

sql-server csv ssis pentaho bcp

We are trying to devise an optimal method for importing very large Excel files into SQL database. Using SSIS is somewhat troublesome because it scans top X records to determine the format of the f...