Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Compiling NetBSD using PCC- Round 2



Hello all,

After taking a few months off, I decided to try (cross-)compiling a kernel/userland using PCC. Unfortunately, there are still a few kinks to be worked out, but perhaps someone here who understands PCC internals and the very verbose output of build.sh can give me pointers in the right direction?

Currently, when building a GENERIC i386 kernel, I get a decent amount of the kernel compiled before the kernel source dependency generation bombs when trying to invoke the preprocessor. I'm not sure what is causing this error, but I do find it interesting that nbmkdep doesn't have any input source file, like previous targets (e.g. nbmkdep takes as input swapnetbsd.c to create GENERIC/swapnetbsd.d and swapnetbsd.c in OBJDIR/sys/arch/i386/compile/GENERIC. The error output shows no input C file to mkdep when ./build.sh fails, and this only occurs for builds using PCC.

Does anyone have any idea what might be causing this? Perhaps my mk.conf is interacting badly with deciding which kernel source files to use to build the kernel? I have pasted the full error as follows, in addition to the command line and mk.conf I used.

#    create  GENERIC/assym.d
cat /home/william/Projects/NetBSD-CVS/src/sys/arch/i386/i386/genassym.cf | /home/william/Proj ects/NetBSD-CVS/src/../tools/pcc/bin/nbgenassym -- CC=/home/william/Projects/NetBSD-CVS/src/../ tools/pcc/bin/i486--netbsdelf-pcc /home/william/Projects/NetBSD-CVS/src/../tools/pcc/bin/nbmkde p -f assym.dep -- -msoft-float -mno-mmx -mno-sse -mno-avx -ffreestanding -fno-zero-initialized -in-bss -O2 -fno-omit-frame-pointer -fstack-protector -Wstack-protector -fno-strict-aliasing -f no-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing- prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-str ings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Wol
d-style-definition -Wno-sign-compare  --sysroot=/home/william/Projects/NetBSD-CVS/src/../destdi
r/i386-pcc -Di386 -I. -I/home/william/Projects/NetBSD-CVS/src/sys/../common/include -I/home/wi lliam/Projects/NetBSD-CVS/src/sys/arch -I/home/william/Projects/NetBSD-CVS/src/sys -nostdinc - DCHILD_MAX="1024" -DOPEN_MAX="1024" -DDIAGNOSTIC -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -std=g nu99 -I/home/william/Projects/NetBSD-CVS/src/sys/lib/libkern/../../../common/lib/libc/quad -I/h ome/william/Projects/NetBSD-CVS/src/sys/lib/libkern/../../../common/lib/libc/string -I/home/wil liam/Projects/NetBSD-CVS/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -D_FOR
TIFY_SOURCE=2 -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/ipf -I/home/william/Proj
ects/NetBSD-CVS/src/sys/external/isc/atheros_hal/dist -I/home/william/Projects/NetBSD-CVS/src/s
ys/external/isc/atheros_hal/ic -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/in
clude -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/common/include -I/home/william/P
rojects/NetBSD-CVS/src/sys/external/bsd/drm2/include -I/home/william/Projects/NetBSD-CVS/src/sy
s/external/bsd/drm2/include/drm -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/d
ist -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/dist/include -I/home/william/
Projects/NetBSD-CVS/src/sys/external/bsd/drm2/dist/include/drm -I/home/william/Projects/NetBSD-
CVS/src/sys/external/bsd/drm2/dist/uapi -I/home/william/Projects/NetBSD-CVS/src/sys/external/bs
d/common/include -D__KERNEL__ -I/home/william/Projects/NetBSD-CVS/src/sys/../common/include -DC ONFIG_AGP -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/dist/drm/i915 -I/home/w illiam/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/i915drm -DCONFIG_DRM_I915_FBDEV -I/home/wi
lliam/Projects/NetBSD-CVS/src/sys/external/bsd/drm2/dist/drm/radeon -I/home/william/Projects/Ne
tBSD-CVS/src/sys/external/bsd/drm2/include/radeon -I/home/william/Projects/NetBSD-CVS/src/sys/e
xternal/bsd/drm2/radeon -I/home/william/Projects/NetBSD-CVS/src/sys/external/bsd/acpica/dist/include
/home/william/Projects/NetBSD-CVS/src/../tools/pcc/libexec/i486--netbsdelf-cpp: invalid option -- '.'
Usage: cpp [-Cdt] [-Dvar=val] [-Uvar] [-Ipath] [-Spath]
error: /home/william/Projects/NetBSD-CVS/src/../tools/pcc/libexec/i486--netbsdelf-cpp terminated with status 1
nbmkdep: compile failed.

*** Failed target:  assym.d
*** Failed command: *snip*
*** Error code 1

Stop.
nbmake: stopped in /home/william/Projects/NetBSD-CVS/objdir/i386-pcc/sys/arch/i386/compile/GENERIC

ERROR: Failed to make depend in "/home/william/Projects/NetBSD-CVS/src/../objdir/i386-pcc/sys/arch/i386/compile/GENERIC"
*** BUILD ABORTED ***
william@xubuntu-ltrain:~/Projects/NetBSD-CVS/util$

william@xubuntu-ltrain:~/Projects/NetBSD-CVS/util$ cat mk.conf.i386-pcc
MKPCC=yes
MKGCC=no
HAVE_LIBGCC=no
HAVE_GCC=0 #Define if MKGCC=no
HAVE_PCC=1
MKCXX=no

./build.sh -m i386 -U -O ../objdir/i386-pcc -T ../tools/pcc -D ../destdir/i386-pcc -R ../releasedir/i386-pcc tools kernel=GENERIC release

As always, thanks in advance for any help!

Sincerely,

--
William D. Jones
thor0505%comcast.net@localhost

Home | Main Index | Thread Index | Old Index