lkml.org 
[lkml]   [2021]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 9/9] tools/nolibc: fix position of -lgcc in the documented example
    Date
    The documentation header in the file provides a command line example
    to explain how to build, but it places -lgcc before the source,
    which usually fails with libgcc.a (e.g. on ARM when uidiv is
    needed). Let's fix this before it leaks into makefiles.
    [This is nolibc's upstream commit b5e282089223]

    Signed-off-by: Willy Tarreau <w@1wt.eu>
    ---
    tools/include/nolibc/nolibc.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
    index 618acad6c932..8b7a9830dd22 100644
    --- a/tools/include/nolibc/nolibc.h
    +++ b/tools/include/nolibc/nolibc.h
    @@ -71,7 +71,7 @@
    *
    * A simple static executable may be built this way :
    * $ gcc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib \
    - * -static -include nolibc.h -lgcc -o hello hello.c
    + * -static -include nolibc.h -o hello hello.c -lgcc
    *
    * A very useful calling convention table may be found here :
    * http://man7.org/linux/man-pages/man2/syscall.2.html
    --
    2.28.0
    \
     
     \ /
      Last update: 2021-01-21 08:31    [W:4.648 / U:0.544 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site