Hi,
just a followup on this subject.
I managed to setup GCC as the primary compiler and disabled shadow compilation.
Now, I compiled the original kernel code without any changes and it works like
a charm.
My next step is was to apply a path to the kernel. This mainly contains C-code
that seems to compile fine. There is however one exception. I have a single
line of assembler where I define a macro:
+#define MAGIC(n) do { \
+ __MAGIC_CASSERT((n) > 0 && (n) < (1U << 22)); \
+ asm ("sethi " #n ", %g0"); \
+} while (0)
This seem to be the cause of my problems. When I try to compile the kernel
again it now fails with the following output:
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
/export/mladen/usr/src/uts/common/sys
/export/mladen/usr/src/uts/common/rpc
/export/mladen/usr/src/uts/common/rpcsvc
/export/mladen/usr/src/uts/common/gssapi
/export/mladen/usr/src/uts/sun4v
/export/mladen/usr/src/uts/sun4v/genassym
/export/mladen/usr/src/uts/sun4v/unix
/export/mladen/usr/src/uts/sun4v/genunix
/export/mladen/usr/src/uts/sparc/ip
`debug64/ipctf.a' is up to date.
/export/mladen/usr/src/uts/sun4v/genunix
/export/mladen/usr/src/uts/sun4v/unix
/usr/ccs/bin/ld -dy -b -o debug64/unix -e _start -I misc/sparcv9/krtld -M ../../
sun4/conf/Mapfile \
./debug64/unix.o ./debug64/modstubs.o -L ../genunix/debug64 -l genunix -L ..
/platmod/debug64 -l platmod -L ./debug64 -l cpu debug64/libdtracestubs.so
Undefined first referenced
symbol in file
asm ./debug64/unix.o
ld: fatal: Symbol referencing errors. No output written to debug64/unix
*** Error code 1
dmake: Fatal error: Command failed for target `debug64/unix'
Current working directory /export/mladen/usr/src/uts/sun4v/unix
*** Error code 1
The following command caused the error:
BUILD_TYPE=DBG64 VERSION='mladen' dmake def.targ
dmake: Fatal error: Command failed for target `def.debug64'
Current working directory /export/mladen/usr/src/uts/sun4v/unix
*** Error code 1
The following command caused the error:
cd unix; pwd; dmake def
dmake: Fatal error: Command failed for target `unix'
Current working directory /export/mladen/usr/src/uts/sun4v
*** Error code 1
The following command caused the error:
cd sun4v; pwd; dmake def
dmake: Fatal error: Command failed for target `sun4v'
Current working directory /export/mladen/usr/src/uts
#
According to my understanding, the asm statement is the one that causes the
error, but I might be wrong. I checked documentation on GCC style asm and my
statement seem to follow the convention. So, basically I'm currently out of
ideas.
Does anyone have some thoughts on this?
Regards,
Mladen
--
This message posted from opensolaris.org