Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
cross-build error on Linux host
Hi,
...
dependall ===> tools/lint1
# compile lint1/tyname.lo
cc -O -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-I/data/home/chris/tmp/netbsd/tools/include/compat -I/data/home/ch
ris/tmp/netbsd/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1
-D_FILE_OFFSET_BITS=64
-I/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bi
n/xlint/lint1 -I. -DPASS=\"lint1.h\"
-I/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../arch/x86_64
-I/data/home/c
hris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../common -c
-o tyname.lo.o /data/home/chris/tmp/netbsd/src/tools/lint1/../..
/usr.bin/xlint/lint1/../common/tyname.c
/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../common/tyname.c:86:1:
error: expected '=', ',', ';', 'asm' or '__
attribute__' before 'intern'
86 | intern(const char *name)
| ^~~~~~
/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../common/tyname.c:
In function 'type_name':
/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../common/tyname.c:373:9:
warning: implicit declaration of function
'intern' [-Wimplicit-function-declaration]
373 | name = intern(buf.data);
| ^~~~~~
/data/home/chris/tmp/netbsd/src/tools/lint1/../../usr.bin/xlint/lint1/../common/tyname.c:373:7:
warning: assignment to 'const char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
373 | name = intern(buf.data);
| ^
*** Failed target: tyname.lo
...
After this change to src/usr.bin/xlint/common/tyname.c it works:
---
diff -u -r1.25 tyname.c
--- tyname.c 24 Jan 2021 11:55:57 -0000 1.25
+++ tyname.c 26 Jan 2021 12:43:50 -0000
@@ -82,7 +82,7 @@
}
/* Return the canonical instance of the string, with unlimited life
time. */
-static const char * __noinline
+static const char * __attribute__((noinline))
intern(const char *name)
{
name_tree_node *n = type_names, **next;
---
Host compiler is
cc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
regards,
chris
Home |
Main Index |
Thread Index |
Old Index