~ruther/guix-exprs

fd6ca65ea4220ec0ce78e0db5e35779f6412390b — Rutherther 7 months ago 80f4af3
fix: add libstdc++ CXXFLAGS, document with target subdir hack
1 files changed, 9 insertions(+), 2 deletions(-)

M ruther/packages/embedded.scm
M ruther/packages/embedded.scm => ruther/packages/embedded.scm +9 -2
@@ 174,8 174,13 @@
        (outputs '("out"))
        (arguments (substitute-keyword-arguments (package-arguments base)
                     ((#:configure-flags flags)
                      #~(cons* "--with-target-subdir=yes"
                               ; This is more of a hack. This option doesn't really seem
                               ; to change what subdir is used eventually, but without it there is
                               ; error: Link tests are not allowed after GCC_NO_EXECUTABLES.
                      #~(cons* "--with-target-subdir=\".\""
                               "CFLAGS=-ffunction-sections -fdata-sections"
                               "CXXFLAGS=-ffunction-sections -fdata-sections"
                               ; Only the arm-none-eabi/lib is added to CROSS_LIBRARY_PATH
                               (string-append "--libdir="
                                              #$output
                                              "/arm-none-eabi/lib")


@@ 190,9 195,11 @@
        (arguments (substitute-keyword-arguments (package-arguments base)
                     ((#:configure-flags flags)
                      #~(cons* "CFLAGS=-ffunction-sections -fdata-sections -fno-exceptions"
                               "CXXFLAGS=-ffunction-sections -fdata-sections -fno-exceptions"
                               (filter
                                  (lambda (flag)
                                    (not (string-prefix? "CFLAGS=" flag)))
                                    (not (or (string-prefix? "CFLAGS=" flag)
                                             (string-prefix? "CXXFLAGS="))))
                                  #$flags)))
                     ((#:phases phases)
                      #~(modify-phases #$phases

Do not follow this link