public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65535] New: powerpc64-freebsd build failure
@ 2015-03-24  7:39 msebor at gcc dot gnu.org
  2015-04-04 20:20 ` [Bug target/65535] " andreast at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-03-24  7:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

            Bug ID: 65535
           Summary: powerpc64-freebsd build failure
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org

Building gcc for powerpc64-freebsd fails with the error below.  Looks like the
FBSD_MAJOR macro is defined to nothing:

$ grep FBSD_MAJOR ./gcc/tm.h
#ifndef FBSD_MAJOR
# define FBSD_MAJOR

Defining the macro to an integer such as 10 lets the build succeed.

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../ppc64fbsd-src/gcc
-I../../ppc64fbsd-src/gcc/build -I../../ppc64fbsd-src/gcc/../include 
-I../../ppc64fbsd-src/gcc/../libcpp/include  \
    -o build/print-rtl.o ../../ppc64fbsd-src/gcc/print-rtl.c
In file included from ./tm.h:21:0,
                 from ../../ppc64fbsd-src/gcc/print-rtl.c:30:
../../ppc64fbsd-src/gcc/config/freebsd-spec.h:108:16: error: operator '<' has
no left operand
 #if FBSD_MAJOR < 5
                ^
../../ppc64fbsd-src/gcc/config/freebsd-spec.h:130:16: error: operator '<' has
no left operand
 #if FBSD_MAJOR < 6
                ^
Makefile:2422: recipe for target 'build/gensupport.o' failed
make[1]: *** [build/gensupport.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:2422: recipe for target 'build/print-rtl.o' failed
make[1]: *** [build/print-rtl.o] Error 1
rm gcov-tool.pod gcj-dbtool.pod gfortran.pod jcf-dump.pod jv-convert.pod
grmic.pod gcj.pod fsf-funding.pod cpp.pod gcov.pod gij.pod gc-analyze.pod
gcc.pod gfdl.pod
make[1]: Leaving directory '/home/msebor/build/powerpc64-freebsd/gcc'
Makefile:4129: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
@ 2015-04-04 20:20 ` andreast at gcc dot gnu.org
  2015-04-04 20:23 ` andreast at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-04 20:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

--- Comment #1 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Here a native build seems to succeed, right now in stage three with sources
from today.

[tritium:head/objdir/gcc] andreast% grep -i fbsd_major *
Makefile:tm_defines= LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 FBSD_MAJOR=11
config.log:tm_defines=' LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 FBSD_MAJOR=11'
config.status:S["tm_defines"]=" LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3
FBSD_MAJOR=11"
tm.h:#ifndef FBSD_MAJOR
tm.h:# define FBSD_MAJOR 11

FBSD_MAJOR is defined during configure time:

config.gcc:line 666

  fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
  tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"

Can you give me some details about your setup/build?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
  2015-04-04 20:20 ` [Bug target/65535] " andreast at gcc dot gnu.org
@ 2015-04-04 20:23 ` andreast at gcc dot gnu.org
  2015-04-04 20:35 ` andreast at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-04 20:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

--- Comment #2 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Btw, cool bug ID ;) 0xffff


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
  2015-04-04 20:20 ` [Bug target/65535] " andreast at gcc dot gnu.org
  2015-04-04 20:23 ` andreast at gcc dot gnu.org
@ 2015-04-04 20:35 ` andreast at gcc dot gnu.org
  2015-04-05 17:51 ` msebor at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-04 20:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

--- Comment #3 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Unfortunately the build fails with:

/usr/local/bin/ld: libbackend.a(tree-diagnostic.o): bad reloc symbol index
(0x10000 >= 0x39) for offset 0x3ee6 in section `.debug_info'
libbackend.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
/export/devel/net/src/gcc/head/gcc/gcc/c/Make-lang.in:71: recipe for target
'cc1' failed
gmake[3]: *** [cc1] Error 1
gmake[3]: Leaving directory '/export/build/src/gcc/head/objdir/gcc'
Makefile:4444: recipe for target 'all-stage3-gcc' failed
gmake[2]: *** [all-stage3-gcc] Error 2


But this is independent to your report.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-04-04 20:35 ` andreast at gcc dot gnu.org
@ 2015-04-05 17:51 ` msebor at gcc dot gnu.org
  2015-04-05 17:52 ` msebor at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-04-05 17:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|powerpc64-freebsd           |*-*-freebsd

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
This isn't powerpc64 specific.  I didn't specify a FreeBSD version when
configuring gcc (i.e., I set --target=powerpc64-freebsd) assuming configure
would default to some supported version.  The code in gcc/config.gcc then
results in FBSD_MAJOR being defined but empty. The patch below lets me build
stage1 (I don't have a FreeBSD sysroot to do a full bootstrap):

index cb08a5c..c668738 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -664,7 +664,7 @@ case ${target} in
   gas=yes
   gnu_ld=yes
   fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
-  tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
+  tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major:-3}"
   tmake_file="t-slibgcc"
   case ${enable_threads} in
     no)

If supplying a default version doesn't seem like a good idea another option
might be to fail early, during the configure step.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-04-05 17:51 ` msebor at gcc dot gnu.org
@ 2015-04-05 17:52 ` msebor at gcc dot gnu.org
  2015-04-16 20:48 ` andreast at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-04-05 17:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-04-05 17:52 ` msebor at gcc dot gnu.org
@ 2015-04-16 20:48 ` andreast at gcc dot gnu.org
  2015-04-17 17:51 ` andreast at gcc dot gnu.org
  2015-04-17 20:21 ` andreast at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-16 20:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

--- Comment #5 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Here my patch:

https://gcc.gnu.org/ml/gcc-patches/2015-04/msg00839.html

I do not like to hardcode a version number. Would mean to update when needed..

The important thing here is, if you build a cross compiler make sure that the
binutils and the gcc target match, including a major version number.

E.g: the binutils --target=amd64-unknown-freebsd10.1 must be equal to the gcc
--target=amd64-unknown-freebsd10.1.

It doesn't work if you give a target w/o version number to binutils and one
with version number to gcc configury.

The mentoned patch was tested on a CentOS -> amd64-unknown-freebsd11.0 cross
also on native FreeBSD (armv6/hf, amd64).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-04-16 20:48 ` andreast at gcc dot gnu.org
@ 2015-04-17 17:51 ` andreast at gcc dot gnu.org
  2015-04-17 20:21 ` andreast at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-17 17:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

--- Comment #6 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Author: andreast
Date: Fri Apr 17 17:50:46 2015
New Revision: 222192

URL: https://gcc.gnu.org/viewcvs?rev=222192&root=gcc&view=rev
Log:
PR target/65535
* config.gcc: Exit with a comment when we do not have a major version
number for the FreeBSD target.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/65535] powerpc64-freebsd build failure
  2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-04-17 17:51 ` andreast at gcc dot gnu.org
@ 2015-04-17 20:21 ` andreast at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2015-04-17 20:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535

Andreas Tobler <andreast at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |6.0

--- Comment #7 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-17 20:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  7:39 [Bug target/65535] New: powerpc64-freebsd build failure msebor at gcc dot gnu.org
2015-04-04 20:20 ` [Bug target/65535] " andreast at gcc dot gnu.org
2015-04-04 20:23 ` andreast at gcc dot gnu.org
2015-04-04 20:35 ` andreast at gcc dot gnu.org
2015-04-05 17:51 ` msebor at gcc dot gnu.org
2015-04-05 17:52 ` msebor at gcc dot gnu.org
2015-04-16 20:48 ` andreast at gcc dot gnu.org
2015-04-17 17:51 ` andreast at gcc dot gnu.org
2015-04-17 20:21 ` andreast at gcc dot gnu.org

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).