0

while porting vpp project into buildroot packaging system a new/unusual/irregular host name being discovered:

checking host system type... x86_64-mu-linux-gnu

while in buildroot when x86_64 is selected, the default toolchain

x86_64-linux

is generated and symlinked into buildroot private toolchain named one

x86_64-buildroot-linux-uclibc

which is completely normal practice for cross-compilation builds.

x86_64-mu-linux-gnu is also appeared not to be a prefix for the compiler tools-set, instead, configure is looking for

x86_64-mu-linux-gcc, x86_64-mu-linux-gcc.br_real, x86_64-mu-linux-ar, etc

the question is:

what is the best practice to fix this "magic" naming (especially to get rid of central "-mu" suffix) into the regular one used inside buildroot toolchain?

would be really appreciated if something alternative to creating a set of symlinks would be proposed. (preferably fixing inside configure scripting system)

Oleg Kokorin
  • 2,288
  • 2
  • 16
  • 28
  • for the quick update, the file responsible for the unusual suffix generation appeared to be: https://github.com/vpp-dev/vpp/blob/master/build-root/Makefile where the complete unusual platform name is hardcoded on the line 179 – Oleg Kokorin May 17 '17 at 12:00

1 Answers1

0

here is the complete original block from Makefile had an issue about:

# OS to configure for.  configure --host will be set to $(ARCH)-$(OS)            
# Allow per-platform overrides                                                   

OS = $(strip $($(PLATFORM)_os))                                                  
ifeq ($(OS),)                                                                    
  OS = mu-linux                                                                  
endif 

the solution to the problem and the reason for the irregular suffix name being discovered:

  1. vpp is expecting you to export PLATFORM variable defining the architecture (something like: i686, arm64, ppc64, x86_64, etc)

example:

PLATFORM=$(ARCH)
  1. while compiling vpp project cross platform way it's expecting special variable to be configured identifying OS you are going to compile for the destination platform and this identification is tricky

    • the name of the variable will be a synthesis of the arch name following by "_os" suffix. the value of the variable has to be OS name.

    • as for linux running on x86_64 you have to export variable named "x86_64_os" with the value "linux" assigned.

example:

x86_64_os=linux

but it's better to export following way:

$(ARCH)_os=linux
  1. resulting build command example will look something like:

    PLATFORM=$(ARCH) $(ARCH)_os=linux make bootstrap
    
  2. in case you fail to identify OS of your toolchain the project compilation environment will define mu-linux as a host OS and will fail to discover toolchain corresponding.

Oleg Kokorin
  • 2,288
  • 2
  • 16
  • 28