Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jun 2008 19:31:56 -0400
From:      Michael Proto <mike@jellydonut.org>
To:        "Michael W. Lucas" <mwlucas@blackhelicopters.org>
Cc:        current@freebsd.org
Subject:   Re: working 8.0 minimal nanoBSD config?
Message-ID:  <4848776C.9080500@jellydonut.org>
In-Reply-To: <20080605175020.GA11340@bewilderbeast.blackhelicopters.org>
References:  <20080605175020.GA11340@bewilderbeast.blackhelicopters.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael W. Lucas wrote:
> Hi,
>
> Anyone out there have a working config for a minimal nanoBSD setup?
>
> One that worked several months ago now doesn't work (yeah, I know, I
> know, big surprise).  This is on:
>
> FreeBSD stretchlimo.blackhelicopters.org 8.0-CURRENT FreeBSD 8.0-CURRENT #9: Thu Jun  5 10:38:43 EDT 2008     mwlucas@stretchlimo.blackhelicopters.org:/usr/obj/usr/src/sys/GENERIC  i386
>
> the build dies without an obvious error:
>
>  -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign  -static -o test test.o
> ===> bin/uuidgen (all)
> cc -O2 -pipe  -DNDEBUG -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/bin/uuidgen/uuidgen.c
> cc -O2 -pipe  -DNDEBUG -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign  -static -o uuidgen uuidgen.o
> 1 error
> *** Error code 2
> 1 error
> *** Error code 2
> 1 error
>

This isn't directly related to nanoBSD, but I've recently had problems
trying to compile with -O2 or -Os flags via a standard buildworld. The
errors generated look suspiciously like the same ones I was getting
(although they're likely generic errors and I'm not clued-in enough to
know the difference). This is on a 8-CURRENT system last supped 5/19/08.

I was able to use "CFLAGS= -O -pipe" in /etc/make.conf to get around it,
but as I'm also compiling for a system with an incredibly small disk (32
MB Flash), I've been doing a lot of trial-and-error settings in
make.conf to find what works with -Os and what doesn't. After about a
dozen buildworld attempts, here are the make.conf settings that worked:

CFLAGS= -Os -fno-strict-aliasing -pipe
COPTFLAGS= -O -pipe
.if ${.CURDIR:M*/src/lib/*}
   CFLAGS= -O -pipe
.endif
.if ${.CURDIR:M*/src/sbin/geom/*}
   CFLAGS= -O -pipe
.endif
.if ${.CURDIR:M*/src/sbin/ggate/*}
   CFLAGS= -O -pipe
.endif
.if ${.CURDIR:M*/src/usr.bin/csup}
   CFLAGS= -O -pipe
.endif
.if ${.CURDIR:M*/src/usr.sbin/acpi/acpidump}
   CFLAGS= -O -pipe
.endif


This is for an ALIX board, using a CPUTYPE of pentium-mmx, probably not
that different than your Soekris actually.

Shot in the dark, but perhaps this might help you as well, and save you
the time it took me to get these right :)


(and before anyone beats me with the standard disclaimer on changing the
optimization settings in make.conf, I really do need the binaries to be
as small as possible)


-Proto



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4848776C.9080500>