Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

defining CPUTYPE when building a custom release

1 view
Skip to first unread message

Don Lewis

unread,
Jun 4, 2018, 6:43:05 PM6/4/18
to
I'm trying to build a custom 11-STABLE release for a machine that is too
wimpy to self-host using the /usr/src/release/release.sh script. The
build host is an amd64 machine and the target machine is is in the i386
family. I've set:
TARGET=i386
TARGET_ARCH=i386
in the release.conf file.

If I don't try to specify a CPUTYPE, I have no problems. But if I add
CPUTYPE?=pentium3
to the make.conf file, the release build fails like this:

--------------------------------------------------------------
>>> stage 4.2: building libraries
--------------------------------------------------------------
===> gnu/lib/libssp/libssp_nonshared (obj,all,install)
===> lib/libcompiler_rt (obj,all,install)
===> gnu/lib/libgcc (obj,all,install)
error: unknown target CPU 'pentium3'
--- ssp-local.o ---
*** [ssp-local.o] Error code 1


This is the same message that I get if I try to compile something on
amd64 if I specify -march:
%cc -c blah.c -march=pentium3
error: unknown target CPU 'pentium3'
but I don't see this when I do the same on an actual i386 machine. I'm
assuming it is because pentium3 is not valid amd64 family member. It
seems like I should be able to avoid this by telling clang that I want
to cross-compile, but clang doesn't seem to like the -arch
command line flag:

%cc -c blah.c -arch x86 -march=pentium3
cc: warning: argument unused during compilation: '-arch x86' [-Wunused-command-line-argument]
error: unknown target CPU 'pentium3'
%cc -c blah.c -arch i386 -march=pentium3
cc: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
error: unknown target CPU 'pentium3'

_______________________________________________
freebsd...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"

Chris H

unread,
Jun 4, 2018, 8:10:06 PM6/4/18
to
On Mon, 4 Jun 2018 15:36:02 -0700 (PDT) "Don Lewis" <truc...@FreeBSD.org> said
Apologies in advance for even *suggesting*; But the KERNCONF
you're working with, originates from, and is within i386/ ,
not amd64/ . Right?

--Chris

Don Lewis

unread,
Jun 4, 2018, 8:16:54 PM6/4/18
to
On 4 Jun, Chris H wrote:
> On Mon, 4 Jun 2018 15:36:02 -0700 (PDT) "Don Lewis" <truc...@FreeBSD.org> said
>
>> I'm trying to build a custom 11-STABLE release for a machine that is too
>> wimpy to self-host using the /usr/src/release/release.sh script. The
>> build host is an amd64 machine and the target machine is is in the i386
>> family. I've set:
>> TARGET=i386
>> TARGET_ARCH=i386
>> in the release.conf file.
>>
>> If I don't try to specify a CPUTYPE, I have no problems. But if I add
>> CPUTYPE?=pentium3
>> to the make.conf file, the release build fails like this:
>>
>> --------------------------------------------------------------
>> >>> stage 4.2: building libraries
>> --------------------------------------------------------------
>> ===> gnu/lib/libssp/libssp_nonshared (obj,all,install)
>> ===> lib/libcompiler_rt (obj,all,install)
>> ===> gnu/lib/libgcc (obj,all,install)
>> error: unknown target CPU 'pentium3'
>> --- ssp-local.o ---
>> *** [ssp-local.o] Error code 1

> Apologies in advance for even *suggesting*; But the KERNCONF
> you're working with, originates from, and is within i386/ ,
> not amd64/ . Right?

Yes. If I don't specify CPUTYPE, I can build a release that installs
and runs on the target host.
0 new messages