bits/syscall.h not generated when --with-headers
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Tue Dec 1 13:39:00 GMT 1998
>Submitter-Id: net
>Originator: Maciej W. Rozycki
>Organization: Technical University of Gdansk, Poland
>Confidential: no
>Synopsis: bits/syscall.h not generated when --with-headers
>Severity: serious
>Priority: medium
>Category: libc
>Class: support
>Release: libc-2.0.104
>Environment: Linux
Host type: alpha-unknown-linux-gnu
System: Linux melmac.amg.gda.pl 2.1.129 #3 Mon Nov 23 13:04:10 CET 1998 alpha unknown
Architecture: alpha
Addons: crypt linuxthreads
Build CFLAGS: -pipe -O2
Build CC: gcc
Compiler version: egcs-2.92.23 19981122 (gcc2 ss-980609 experimental)
Kernel headers: UTS_RELEASE
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: yes
Build bounded: no
Build static-nss: yes
Stdio: libio
>Description:
When --with-headers option is passed to configure, the resulting
make environment is unable to find the correct asm/unistd.h kernel
header, which results in an effectively empty bits/syscall.h.
>How-To-Repeat:
Assuming /usr/include/asm points to /usr/src/linux/include/asm:
rm -f /usr/src/linux
<path_to_configure>/configure \
--with-headers=/usr/src/linux-2.1.130/include \
--enable-add-ons=yes
make
The above sequence of commands yields the following
bits/syscall.h:
/* Generated at libc build time from kernel syscall list. */
#ifndef _SYSCALL_H
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
#endif
>Fix:
The following patch works for me, though there might exist
solutions making use of some other make variables:
diff -u --recursive --new-file glibc-2.0.100.macro/sysdeps/unix/sysv/linux/Makefile glibc-2.0.100/sysdeps/unix/sysv/linux/Makefile
--- glibc-2.0.100.macro/sysdeps/unix/sysv/linux/Makefile Thu Oct 29 01:06:22 1998
+++ glibc-2.0.100/sysdeps/unix/sysv/linux/Makefile Tue Nov 24 01:02:45 1998
@@ -33,7 +33,7 @@
echo ''; \
SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
$(@:.d=.h) $(@:.h=.d))' \
- $(CC) -E -x c $< -D_LIBC -dM | \
+ $(CC) -E -x c $(sysincludes) $< -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
More information about the Libc-alpha
mailing list