lkml.org 
[lkml]   [2023]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH nolibc 12/19] selftests/nolibc: allow building i386 with multiarch compiler
    Date
    From: Thomas Weißschuh <linux@weissschuh.net>

    When building with a multiarch-capable compiler, like those provided by
    common distributions the -m32 argument is required to build 32bit code.

    Wrap it in cc-option in case the compiler is not multiarch-capable.

    Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
    Acked-by: Willy Tarreau <w@1wt.eu>
    Link: https://lore.kernel.org/r/20230917-nolibc-syscall-nr-v2-1-03863d509b9a@weissschuh.net
    ---
    tools/testing/selftests/nolibc/Makefile | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
    index ee6a9ad28cfd..891aa396163d 100644
    --- a/tools/testing/selftests/nolibc/Makefile
    +++ b/tools/testing/selftests/nolibc/Makefile
    @@ -113,6 +113,7 @@ else
    Q=@
    endif

    +CFLAGS_i386 = $(call cc-option,-m32)
    CFLAGS_ppc = -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
    CFLAGS_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
    CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2)
    --
    2.40.1
    \
     
     \ /
      Last update: 2023-10-12 21:33    [W:2.802 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site