public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [GCC-3.0.3] Compilation issues on NetBSD(i386)
@ 2002-02-18  6:49 Dias Da Silva Loic
  0 siblings, 0 replies; only message in thread
From: Dias Da Silva Loic @ 2002-02-18  6:49 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 3377 bytes --]


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 #2: Type: application/pgp-signature, Size: 180 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-18 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-18  6:49 [GCC-3.0.3] Compilation issues on NetBSD(i386) Dias Da Silva Loic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).