[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: compile busybox on a Pentium3 for Pentium-mmx = segmentation fault
From:       Denis Vlasenko <vda.linux () googlemail ! com>
Date:       2006-11-24 23:13:56
Message-ID: 200611250013.56904.vda.linux () googlemail ! com
[Download RAW message or body]

Please do not top post. It's sort of hard to figure out what are you replying
to.

On Friday 24 November 2006 23:59, Felipe C. wrote:
> Let me try again:
> 
> I don't have any problems compiling bb. It works just fine no matter the
> configuration. I even know that the executable works (on any machine with a
> Pentium 2 or better). When I run it on the Pentium mmx I get a segmentation
> fault.

Can I at the very least se the "strace busybox" output? Please?

> What I am trying to figure out is how to tell busybox to compile without the
> default optimizations for the current host. The only way out that I figured
> out so far was to create a gcc cross-compiler with target=i586 and then
> change the busybox configuration to use it. It works but I would assume that
> there must be an easier way to compile the busybox using the host gcc as
> long the host and the target share the same architecture  (something like
> compiling the kernel - I can compile it for any x86 on the i686 using the
> standard gcc).

And in this case, you did not answered the question. You restated what
I already understood.

Anyway. If you are compiling current svn, you should take a look into
arch/i386/Makefile. It has architecture-specific flags. Currently
it contains just one line:

CPPFLAGS += -march=i386 -mpreferred-stack-boundary=2

Which is, if I understand it correctly, instructs gcc to build for 386.
You can verify it by compiling with make V=1:

# make V=1
rm -f .kernelrelease
echo 1.2.2.svn > .kernelrelease
make -f scripts/Makefile.build obj=scripts/basic
mkdir -p .tmp_versions
rm -f .tmp_versions/*
make -f scripts/Makefile.build obj=.
make -f scripts/Makefile.build obj=scripts
make -f scripts/Makefile.build obj=applets
make -f scripts/Makefile.build obj=archival
make -f scripts/Makefile.build obj=archival/libunarchive
 gcc -Wp,-MD,archival/libunarchive/.decompress_unzip.o.d
 -Iinclude -Ilibbb  -I/.1/usr/srcdevel/bbox/fix/busybox.tt/libbb
 -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE
 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.2.2.svn)"
 -DBB_BT=AUTOCONF_TIMESTAMP -Wall -Wstrict-prototypes -Wshadow -Werror -Wundef
 -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc
 -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fomit-frame-pointer
 -ffunction-sections -fdata-sections -march=i386 -mpreferred-stack-boundary=2
 -Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=#s"
 -D"KBUILD_BASENAME=KBUILD_STR(decompress_unzip)"
 -D"KBUILD_MODNAME=KBUILD_STR(decompress_unzip)"
 -c -o archival/libunarchive/decompress_unzip.o
 archival/libunarchive/decompress_unzip.c

See that "-march=i386 -mpreferred-stack-boundary=2"?

If you don't see it, then you are not on iX86 arch. Maybe you are on
x86_64, then you need to create arch/x86_64/Makefile.

Or do you compile older bbox?

> On 11/24/06, Denis Vlasenko <vda.linux@googlemail.com> wrote:
> > Please give more details:
> > .config
> > gcc -v
> > make V=1

?
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic