glibc/scripts/gen-as-const.awk
Roland McGrath 9ae1033217 * Makerules (check-abi-%): Use two rules for $(common-objpfx) and
$(objpfx) directories, and get rid of vpath directives.  The previous
	arrangement resulted in files being written to the source directories
	when run in a clean build.  Find all .abilist files in $(..)abilist/.
	(update-abi-%): Likewise.
	(generated): Don't add .symlist files, they'll be intermediates.

	* sysdeps/generic/init-first.c: Add a comment.

	* elf/Makefile ($(objpfx)ld.so): Pass -z defs in link.

	* scripts/gen-as-const.awk: Grok lone "--" as a separator between
	#includes and expressions.

	* scripts/merge-abilist.awk: Omit cpu-.*-os.*/modifier from merged
	config list when it already contains cpu-.*-os.* without / part.

	* Makerules (sed-remove-dotdot): New variable.
	($(common-objpfx)%.make): Use it.  Depend on $(before-compile).
	($(common-objpfx)%.h $(common-objpfx)%.h.d): Likewise.
	(check-abi-config): New variable, append /tls or /notls to the tuple.
	(check-abi-%): Use that for -v config value.
	Find .abilist files in abilist/libfoo.abilist, not in subdir.
	* Rules: Move bits/stdio_lim.h generation rules to Makerules.
2003-01-15 08:08:20 +00:00

33 lines
792 B
Awk

# Script used in producing headers of assembly constants from C expressions.
# The input to this script looks like:
# #cpp-directive ...
# NAME1
# NAME2 expression ...
# The output of this script is C code to be run through gcc -S and then
# massaged to extract the integer constant values of the given C expressions.
# A line giving just a name implies an expression consisting of just that name.
BEGIN { started = 0 }
# cpp directives go straight through.
/^#/ { print; next }
NF >= 1 && !started {
print "void dummy(void) {";
started = 1;
}
# Separator.
$1 == "--" { next }
NF == 1 { sub(/^.*$/, "& &"); }
NF > 1 {
name = $1;
sub(/^[^ ]+[ ]+/, "");
printf "asm (\"@@@name@@@%s@@@value@@@%%0@@@end@@@\" : : \"i\" (%s));\n",
name, $0;
}
END { if (started) print "}" }