Bug 4989 - [2.18 regression] build failure on m68k-linux-gnu
Summary: [2.18 regression] build failure on m68k-linux-gnu
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-01 11:21 UTC by Matthias Klose
Modified: 2008-01-16 02:44 UTC (History)
1 user (show)

See Also:
Host:
Target: m68k-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2007-09-01 11:21:32 UTC
2.18 fails to build on m68k-linux-gnu:

/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../bfd
-I. -DTRAD_CORE   -I. -I../../bfd -I../../bfd/../include     -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o trad-core.lo
../../bfd/trad-core.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -DTRAD_CORE -I.
-I../../bfd -I../../bfd/../include -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -c ../../bfd/trad-core.c  -fPIC -DPIC -o
.libs/trad-core.o
../../bfd/trad-core.c: In function 'trad_unix_core_file_p':
../../bfd/trad-core.c:122: error: 'PAGE_SIZE' undeclared (first use in this
function)
../../bfd/trad-core.c:122: error: (Each undeclared identifier is reported only once
../../bfd/trad-core.c:122: error: for each function it appears in.)
make[5]: *** [trad-core.lo] Error 1
make[5]: Leaving directory `/build/buildd/binutils-2.18/builddir-single/bfd'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/build/buildd/binutils-2.18/builddir-single/bfd'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/build/buildd/binutils-2.18/builddir-single/bfd'
make[2]: *** [all-bfd] Error 2
Comment 1 Nick Clifton 2007-09-25 16:28:50 UTC
Subject: Re:  New: [2.18 regression] build failure on	m68k-linux-gnu

Hi Doko,

> 2.18 fails to build on m68k-linux-gnu:

> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -DTRAD_CORE -I.
> -I../../bfd -I../../bfd/../include -W -Wall -Wstrict-prototypes
> -Wmissing-prototypes -Werror -g -O2 -c ../../bfd/trad-core.c  -fPIC -DPIC -o
> .libs/trad-core.o
> ../../bfd/trad-core.c: In function 'trad_unix_core_file_p':
> ../../bfd/trad-core.c:122: error: 'PAGE_SIZE' undeclared (first use in this
> function)

This sounds like a header file problem.  Presumably a system header file on the 
m68k-linux-gnu system is defining NBPG in terms of this "PAGE_SIZE" symbol, but 
it is not defining that symbol nor including a header file that provides such a 
definition.  Can you confirm this ?

If this is correct, then can we found out if this is a bug in the system header 
(it should be defining/including PAGE_SIZE) or a bug in the bfd configuration 
(an extra system header should be included).

Cheers
   Nick
Comment 2 Andreas Schwab 2007-09-25 17:21:33 UTC
linux-2.6/include/asm-m68k/user.h:#define NBPG 4096
Comment 3 Nick Clifton 2007-09-26 07:54:28 UTC
Subject: Re:  [2.18 regression] build failure on	m68k-linux-gnu

Hi Guys,

> linux-2.6/include/asm-m68k/user.h:#define NBPG 4096

In which case, where is this PAGE_SIZE reference coming from ?

Cheers
   Nick

Comment 4 Alan Modra 2008-01-16 02:44:39 UTC
As Nick said, this is a system header problem, not a binutils one.