[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libstdc++ for cross compilers
From: |
Ricardo Wurmus |
Subject: |
Re: libstdc++ for cross compilers |
Date: |
Sun, 21 May 2017 15:09:13 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Ricardo Wurmus <address@hidden> writes:
> Ricardo Wurmus <address@hidden> writes:
>>
>> I created a package variant like this:
>>
>> --8<---------------cut here---------------start------------->8---
>> (define-public libstdc++-arm-none-eabi
>> (let* ((xgcc gcc-arm-none-eabi-6)
>> (libstdc++ (make-libstdc++ xgcc)))
>> (package (inherit libstdc++)
>> (name "libstdc++-arm-none-eabi")
>> (arguments
>> (substitute-keyword-arguments (package-arguments libstdc++)
>> ((#:configure-flags flags)
>> ``("--target=arm-none-eabi"
>> "--disable-libstdcxx-pch"
>> ,(string-append "--with-gxx-include-dir="
>> (assoc-ref %outputs "out")
>> "/arm-none-eabi/include"))))))))
>> --8<---------------cut here---------------end--------------->8---
>>
>> And adding it to the inputs for the Axoloti firmware seems to be fine
>> for a while until it fails to find headers with “#include_next”. I’ll
>> try to gather some better error messages.
The problem turned out to be right there: the configure flags set
“--target” but not “--host”, so libstdc++ wasn’t cross-built.
I have already overcome the problem and will submit a couple of patches
in the coming days.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net