Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Cc: grub-devel@gnu.org, bean123ch@gmail.com,
	David Miller <davem@davemloft.net>
Subject: Re: powerpc/sparc problems
Date: Thu, 15 Oct 2009 18:41:41 -0400	[thread overview]
Message-ID: <1255646501.13480.32.camel@mj> (raw)
In-Reply-To: <4AD70E53.80004@gmail.com>

On Thu, 2009-10-15 at 13:58 +0200, Vladimir 'phcoder' Serbinenko wrote:

> The methods discussed in this thread are good but aren't for release. So
> I just reverted Pavel's commit

My cross-build for sparc64 fails now:

__bswapsi2 in fat is not defined

This can be traced to the following part of config.log:

configure:7314: checking for __bswapsi2
configure:7370: sparc64-linux-uclibc-gcc -o conftest -Wall -W -Wshadow
-Wpointer-arith -Wmissing-prototypes                  -Wundef
-Wstrict-prototypes -g -Os -m64 -fno-stack-protector -Werror -nostdlib
-Wl,--defsym,___main=0x8100   -m64 conftest.c  >&5
In file included
from /opt/sparc/usr/lib/gcc/sparc64-linux-uclibc/4.3.3/include-fixed/syslimits.h:7,

from /opt/sparc/usr/lib/gcc/sparc64-linux-uclibc/4.3.3/include-fixed/limits.h:11,
                 from conftest.c:38:
/opt/sparc/usr/lib/gcc/sparc64-linux-uclibc/4.3.3/include-fixed/limits.h:122:61: error: no include path in which to search for limits.h
cc1: warnings being treated as errors
conftest.c:51: error: function declaration isn't a prototype
configure:7377: $? = 1

The reason limits.h is missing is because I failed to compile uClibc for
sparc64 using buildroot.

But even if I create an empty /opt/sparc/usr/include/limits.h, the test
fails:

configure:7314: checking for __bswapsi2
configure:7370: gcc -o conftest -Wall -W -Wshadow -Wpointer-arith
-Wmissing-prototypes                  -Wundef -Wstrict-prototypes -g -Os
-fno-dwarf2-cfi-asm -m64 -fno-stack-protector -mno-stack-arg-probe
-Werror -nostdlib -Wl,--defsym,___main=0x8100   -m64 conftest.c  >&5
cc1: warnings being treated as errors
conftest.c:51: error: function declaration isn't a prototype
configure:7377: $? = 1

I'm afraid it's a real bug that would affect native compilation.  We
should move adding -Werror to TARGET_CFLAGS after all checks.

Even after I do that, I still get:

configure:7305: checking for __bswapsi2
configure:7361: gcc -o conftest -Wall -W -Wshadow -Wpointer-arith
-Wmissing-prototypes                  -Wundef -Wstrict-prototypes -g -Os
-fno-dwarf2-cfi-asm -m64 -fno-stack-protector -mno-stack-arg-probe
-nostdlib -Wl,--defsym,___main=0x8100   -m64 conftest.c  >&5
conftest.c:51: warning: function declaration isn't a prototype
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to
0000000000400144
/tmp/ccoCvQMe.o: In function `main':
/home/proski/src/grub2.git/build-ieee1275-sparc64-linux-uclibc/conftest.c:62: undefined reference to `__bswapsi2'
collect2: ld returned 1 exit status
configure:7368: $? = 1

That may or may not be due to the lack of the libc.  I tried checking
for __ashldi3, which is exported unconditionally on PowerPC, and the
check fails, even though I have libc for PowerPC.  That's also a
cross-compiler, but I can test it on a PowerMac if necessary.

This makes me think that checks for __bswapsi2 and  __bswapdi2 will fail
on Sparc64, even if those functions are present and even if
--disable-werror is used.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-10-15 22:41 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  8:55 powerpc/sparc problems Felix Zielcke
2009-10-12  9:05 ` David Miller
2009-10-12  9:42   ` Felix Zielcke
2009-10-12  9:56   ` Vladimir 'phcoder' Serbinenko
2009-10-12 10:11     ` David Miller
2009-10-12 10:27     ` Felix Zielcke
2009-10-12  9:26 ` Vladimir 'phcoder' Serbinenko
2009-10-12  9:33 ` Felix Zielcke
2009-10-20 18:07   ` rubisher
2009-10-20 20:24     ` Vladimir 'phcoder' Serbinenko
2009-10-21 15:59       ` rubisher
2009-10-12  9:58 ` Bean
2009-10-12 10:14   ` David Miller
2009-10-12 10:26     ` Vladimir 'phcoder' Serbinenko
2009-10-12 10:28       ` David Miller
2009-10-12 15:29         ` Pavel Roskin
2009-10-12 15:45           ` Vladimir 'phcoder' Serbinenko
2009-10-12 22:03             ` Pavel Roskin
2009-10-12 23:39             ` David Miller
2009-10-15 11:58         ` Vladimir 'phcoder' Serbinenko
2009-10-15 22:41           ` Pavel Roskin [this message]
2009-10-16 12:44             ` David Miller
2009-10-16 14:10               ` Pavel Roskin
2009-10-17  1:21               ` Pavel Roskin
2009-10-17  9:08                 ` Vladimir 'phcoder' Serbinenko
2009-10-17 10:11                 ` Robert Millan
2009-10-20 21:38                   ` [PATCH] auto-generate libgcc.h Robert Millan
2009-10-21  6:28                     ` Vladimir 'phcoder' Serbinenko
2009-10-21 15:55                       ` rubisher
2009-10-21 21:00                         ` Vladimir 'phcoder' Serbinenko
2009-10-23 16:19                           ` rubisher
2009-10-12 10:31     ` powerpc/sparc problems Bean
2009-10-12 11:07       ` David Miller
2009-10-12 14:05         ` Bean
2009-10-14 16:37       ` Robert Millan
2009-10-21 16:03   ` rubisher
2009-10-21 20:15     ` Bean
2009-10-28 10:24 ` Felix Zielcke
2009-10-28 10:29   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-10-22  9:12 rubisher
2009-10-22  9:31 ` Bean
2009-10-23 20:34   ` rubisher
2009-10-24  6:13     ` Bean
2009-10-25 15:22       ` rubisher
2009-10-25 15:57         ` Bean
2009-10-26 21:06           ` rubisher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1255646501.13480.32.camel@mj \
    --to=proski@gnu.org \
    --cc=bean123ch@gmail.com \
    --cc=davem@davemloft.net \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox