[LINKER] Add single underscore to all definitions, no -D for dashed param.

This makes possibility for the script to append the definitions to CFLAGS
and LDFLAGS, and with the feature of disabling of -D prependation it will
make possible to generate ARCH_FLAGS generic to each specific chip.
This commit is contained in:
BuFran
2013-07-14 08:00:18 +02:00
committed by Piotr Esden-Tempski
parent ea589b9a4e
commit d15a0e63fe
10 changed files with 46 additions and 33 deletions

View File

@@ -38,8 +38,12 @@ BEGIN {
if ($2 != "+")
PAT=$2;
for (i = 3; i <= NF; i = i + 1)
printf "-D%s ",$i;
for (i = 3; i <= NF; i = i + 1) {
if ($i ~ /^-/)
printf "%s ",$i;
else
printf "-D_%s ",$i;
}
if (PAT=="END")
exit;