* [ptxdist] problem using custom host compiler
@ 2017-10-26 19:48 Sandy Patterson
2017-10-27 12:32 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Sandy Patterson @ 2017-10-26 19:48 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 1251 bytes --]
I am attempting to specify a host compiler via the file
~/.ptxdist/ptxdistrc-2015.02
PTXCONF_SETUP_HOST_CPP="cpp-4.8"
PTXCONF_SETUP_HOST_CC="gcc-4.8"
PTXCONF_SETUP_HOST_CXX="g++-4.8"
PTXCONF_SETUP_HOST_MAKE="make"
I think this is ptxdist setup developer options.
I expected ptxdist to use these compilers to build host-* packages, but
instead it is using gcc and g++.
I'm including a patch which behaves more the way I expect below. Would you
guys care to comment on how I should have done this? I would like to build
my firmware on different ubuntu versions which come with different
compilers.
Thanks,
Sandy Patterson
--- ptxdist-2015.02.0-orig/rules/other/Namespace.make 2017-10-26
15:20:35.925028016 -0400
+++ ptxdist-2015.02.0/rules/other/Namespace.make 2017-10-26
15:21:19.248999794 -0400
@@ -19,8 +19,8 @@
PTXCONF_COMPILER_PREFIX := $(call remove_quotes,
$(PTXCONF_COMPILER_PREFIX))
COMPILER_PREFIX := $(PTXCONF_COMPILER_PREFIX)
-HOSTCC := gcc
-HOSTCXX := g++
+HOSTCC := $(call remove_quotes, $(PTXCONF_SETUP_HOST_CC))
+HOSTCXX := $(call remove_quotes, $(PTXCONF_SETUP_HOST_CXX))
PTXCONF_ARCH_STRING := $(call remove_quotes, $(PTXCONF_ARCH_STRING))
PTXCONF_KERNEL_ARCH_STRING := $(call remove_quotes,
$(PTXCONF_KERNEL_ARCH_STRING))
[-- Attachment #1.2: Type: text/html, Size: 2047 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] problem using custom host compiler
2017-10-26 19:48 [ptxdist] problem using custom host compiler Sandy Patterson
@ 2017-10-27 12:32 ` Michael Olbrich
2017-10-27 12:57 ` Sandy Patterson
0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2017-10-27 12:32 UTC (permalink / raw)
To: ptxdist
On Thu, Oct 26, 2017 at 03:48:46PM -0400, Sandy Patterson wrote:
> I am attempting to specify a host compiler via the file
> ~/.ptxdist/ptxdistrc-2015.02
>
> PTXCONF_SETUP_HOST_CPP="cpp-4.8"
> PTXCONF_SETUP_HOST_CC="gcc-4.8"
> PTXCONF_SETUP_HOST_CXX="g++-4.8"
> PTXCONF_SETUP_HOST_MAKE="make"
>
> I think this is ptxdist setup developer options.
>
> I expected ptxdist to use these compilers to build host-* packages, but
> instead it is using gcc and g++.
>
> I'm including a patch which behaves more the way I expect below. Would you
> guys care to comment on how I should have done this? I would like to build
> my firmware on different ubuntu versions which come with different
> compilers.
It should work as is. The 'gcc' from HOSTCC should be
platform-XXX/sysroot-host/lib/wrapper/gcc. That's a script that will add
extra options and then call platform-XXX/sysroot-host/lib/wrapper/real/gcc.
This should be a symlink to ${PTXCONF_SETUP_HOST_CC}.
Where exactly does it use the wrong compiler?
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] problem using custom host compiler
2017-10-27 12:32 ` Michael Olbrich
@ 2017-10-27 12:57 ` Sandy Patterson
0 siblings, 0 replies; 3+ messages in thread
From: Sandy Patterson @ 2017-10-27 12:57 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 925 bytes --]
Ahh, it seems as very much didn't understand. The Namespace.make sets
HOSTCC to gcc for prepare, but then during compile, the path starts with
that wrapper/real folder and on the command line you see just gcc. If I run
gcc --version I get the correct 4.8.
I also spaced and didn't realize that the symlinks in wrapper/real were
relative for cc and c++ so they all point to the 4.8 versions
...
lrwxrwxrwx 1 apatterson apatterson 3 Oct 27 08:20 c++ -> g++
lrwxrwxrwx 1 apatterson apatterson 3 Oct 27 08:20 cc -> gcc
lrwxrwxrwx 1 apatterson apatterson 16 Oct 27 08:20 cpp -> /usr/bin/cpp-4.8
lrwxrwxrwx 1 apatterson apatterson 16 Oct 27 08:20 g++ -> /usr/bin/g++-4.8
lrwxrwxrwx 1 apatterson apatterson 16 Oct 27 08:20 gcc -> /usr/bin/gcc-4.8
I think the console output compile command starting with gcc without the
4.8 confused me, but it was using the path and symlinks to get to the
correct one.
Thanks,
Sandy Patterson
[-- Attachment #1.2: Type: text/html, Size: 1123 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-27 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 19:48 [ptxdist] problem using custom host compiler Sandy Patterson
2017-10-27 12:32 ` Michael Olbrich
2017-10-27 12:57 ` Sandy Patterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox