This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GCC-3.0.3] Compilation issues on NetBSD(i386)



Hi,

I'm posting here since i don't think it's a bug, just a bad value.

I've an issue while compiling gcc-3.0.3 on NetBSD[1.5](i386)

without any source modification the error occurs in ${prefix}/gcc :

--------------------------------------------------------------------------------
./xgcc -B./
-B/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/bin/
-isystem
/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/include
-isystem
/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/sys-include
-O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include   -g1  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I. -I./. -I./config -I./../include
-DUSE_COLLECT2 -DL_clz -c ./libgcc2.c -o libgcc/./_clz.o
/var/tmp/ccJIOMGY.s: Assembler messages:
/var/tmp/ccJIOMGY.s:379: Error: Alignment not a power of 2
gmake[1]: *** [libgcc/./_clz.o] Error 1
gmake[1]: Leaving directory `/usr/local/goinfre/dp/gcc-3.0.3/gcc'
--------------------------------------------------------------------------------

so after reading some identical problems from the net, i have modified
in ${prefix}/gcc/config/i386/netbsd.h a line about asm alignment
from 

  #define ASM_OUTPUT_ALIGN(FILE,LOG) \
    if ((LOG)!=0) fprintf ((FILE), "\t.align %d, 0x90\n", (LOG)) 

to

  #define ASM_OUTPUT_ALIGN(FILE,LOG) \
    if ((LOG)!=0) fprintf ((FILE), "\t.align %d, 0x80\n", 1 << (LOG))

after this modification, it compiles but the new compiled xgcc cannot
create executables :

--------------------------------------------------------------------------------
checking whether the C compiler
(/usr/local/goinfre/dp/gcc-3.0.3/gcc/xgcc
-B/usr/local/goinfre/dp/gcc-3.0.3/gcc/
-B/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/bin/
-B/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/lib/
-isystem
/u/dp/public/packages/gcc-3.0.3/arch/i386-NetBSD/i386-unknown-netbsdelf1.5ZA/include
-g -O2 ) works... no configure: error: installation or configuration
problem: C compiler cannot create executables.
--------------------------------------------------------------------------------

and a manual hello test tells :

--------------------------------------------------------------------------------
(raab:...gcc-3.0.3/gcc)>setenv PATH ${PATH}:$PWD # (for cc1)
(raab:...gcc-3.0.3/gcc)>./xgcc test.c
ld: warning: cannot find entry symbol start; defaulting to 08048450
/usr/lib/crt0.o: In function `___start':
/usr/lib/crt0.o(.text+0xc1): undefined reference to `main'
/var/tmp/ccOFkWOw.o: In function `_main':
/var/tmp/ccOFkWOw.o(.text+0x1a): undefined reference to `___main'
/var/tmp/ccOFkWOw.o(.text+0x27): undefined reference to `_printf'
--------------------------------------------------------------------------------

notice that the problem is the same for ASM_OUTPUT_ALIGN values of :

if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1 << (LOG))
or
if ((LOG)!=0) fprintf ((FILE), "\t.align %d, 0x90\n", (LOG))
or
if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1 << (LOG))
or ... 

I am not familiar with this alignment needing, so can you tell me
what's the correct value please, if you know it ?
Or give me the way to find it..

thanks.

-- 
Mglcel

Attachment: msg01018/pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]