PowerPC: fix libm ABI issue for llroundl
[glibc.git] / scripts / lib-names.awk
blobccb7b7f4313e4b63f731fa35036c3295c2f6f3d9
1 # awk script for soversions.i -> gnu/lib-names.h; see Makeconfig.
5 split($1, fields, "=")
6 lib = fields[1];
7 soname = version = fields[2];
8 sub(/^.*=/, "", soname);
9 sub(/^lib.*\.so\./, "", version);
10 if ($soname !~ /^lib/) {
11 extra = soname;
12 sub(/\.so.*$/, "", extra);
14 else {
15 extra = "";
17 soname = "\"" soname "\"";
18 lib = toupper(lib);
19 extra = toupper(extra);
20 gsub(/-/, "_", lib);
21 gsub(/-/, "_", extra);
22 macros[$1 FS lib "_SO"] = soname;
23 if (extra)
24 macros[$1 FS extra "_SO"] = soname;
27 END {
28 for (elt in macros) {
29 split(elt, x);
30 pfx = multi ? "# define " : "#define ";
31 printf("%-40s%s\n", pfx x[2], macros[elt]);