diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2008-06-07 08:07:23 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2008-06-17 10:07:51 +0300 |
commit | e0b3e9cc7d938534bf0c62f232ae80dad15e0c2d (patch) | |
tree | 7de87a44a5bd4952549cbec569b02bca36d3f368 /lua_scripts/argvenvp_gcc.lua | |
parent | 7153cf31589dcc30b508e84db1dda7baa0d3a034 (diff) |
Use mode-specific "specs" files for the cross-gcc + a "specs" file for "maemo"
- Chages the way how the cross compiler is started: if a "specs" file exists,
uses that, otherwise adds "-I/usr/include" to gcc's arguments (which was the
"old way", used until this change)
- Added a "specs" file for the "maemo" mode; this file comes directly from
the old scratchbox ("SB1") configuration.
Diffstat (limited to 'lua_scripts/argvenvp_gcc.lua')
-rw-r--r-- | lua_scripts/argvenvp_gcc.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua_scripts/argvenvp_gcc.lua b/lua_scripts/argvenvp_gcc.lua index 48249a0..0f4fb34 100644 --- a/lua_scripts/argvenvp_gcc.lua +++ b/lua_scripts/argvenvp_gcc.lua @@ -38,6 +38,7 @@ gcc_tools = { gcc_bindir = os.getenv("SBOX_CROSS_GCC_DIR") gcc_subst_prefix = os.getenv("SBOX_CROSS_GCC_SUBST_PREFIX") gcc_extra_args = os.getenv("SBOX_EXTRA_CROSS_COMPILER_ARGS") +gcc_specs = os.getenv("SBOX_CROSS_GCC_SPECS_FILE") gcc_extra_stdinc = os.getenv("SBOX_EXTRA_CROSS_COMPILER_STDINC") gcc_block_args = os.getenv("SBOX_BLOCK_CROSS_COMPILER_ARGS") ld_extra_args = os.getenv("SBOX_EXTRA_CROSS_LD_ARGS") @@ -55,6 +56,9 @@ for prefix in string.gmatch(":" .. os.getenv("SBOX_CROSS_GCC_PREFIX_LIST"), "[^: tmp.new_filename = gcc_bindir .. "/" .. gcc_subst_prefix .. gcc_compilers[i] tmp.add_tail = {} tmp.remove = {} + if (gcc_specs) then + table.insert(tmp.add_tail, "-specs="..gcc_specs) + end if (gcc_extra_args) then for gcc_extra in string.gmatch(gcc_extra_args, "[^ ]+") do table.insert(tmp.add_tail, gcc_extra) |