Blame SOURCES/binutils-2.19.50.0.1-output-format.sed

381f6c
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
381f6c
# Imported from glibc/Makerules.
381f6c
381f6c
/ld.*[ 	]-E[BL]/b f
381f6c
/collect.*[ 	]-E[BL]/b f
381f6c
/OUTPUT_FORMAT[^)]*$/{N
381f6c
s/\n[	 ]*/ /
381f6c
}
381f6c
t o
381f6c
: o
381f6c
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
381f6c
t q
381f6c
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
381f6c
t s
381f6c
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
381f6c
t q
381f6c
d
381f6c
: s
381f6c
s/"//g
381f6c
G
381f6c
s/\n//
381f6c
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
381f6c
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
381f6c
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
381f6c
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
381f6c
q
381f6c
: q
381f6c
s/"//g
381f6c
p
381f6c
q
381f6c
: f
381f6c
s/^.*[ 	]-E\([BL]\)[ 	].*$/,\1/
381f6c
t h
381f6c
s/^.*[ 	]-E\([BL]\)$/,\1/
381f6c
t h
381f6c
d
381f6c
: h
381f6c
h