Keil Logo

Technical Support

On-Line Manuals

Compiler Reference Guide

Preface armclang Command-line Options Support level definitions Summary of armclang command-line options -C -c -D -E -e -fbare-metal-pie -fbracket-depth=N -fcommon, -fno-common -fdata-sections, -fno-data-sections -ffast-math, -fno-fast-math -ffixed-rN -ffp-mode -ffunction-sections, -fno-function-sections -fident, -fno-ident @file -fldm-stm, -fno-ldm-stm -fno-builtin -fno-inline-functions -flto, -fno-lto -fexceptions, -fno-exceptions -fomit-frame-pointer, -fno-omit-frame-pointer -fropi, -fno-ropi -fropi-lowering, -fno-ropi-lowering -frwpi, -fno-rwpi -frwpi-lowering, -fno-rwpi-lowering -fshort-enums, -fno-short-enums -fshort-wchar, -fno-short-wchar -fstack-protector, -fstack-protector-all, -fstack- -fstrict-aliasing, -fno-strict-aliasing -ftrapv -fvectorize, -fno-vectorize -fvisibility -fwrapv -g, -gdwarf-2, -gdwarf-3, -gdwarf-4 -I -include -L -l -M, -MM -MD, -MMD -MF -MG -MP -MT -march -marm -masm -mbig-endian -mbranch-protection -mcmse -mcpu -mexecute-only -mfloat-abi -mfpu -mimplicit-it -mlittle-endian -mmemtag-stack, -mno-memtag-stack -mno-neg-immediates -moutline, -mno-outline -mpixolib -munaligned-access, -mno-unaligned-access -mthumb -nostdlib -nostdlibinc -o -O -pedantic -pedantic-errors -Rpass -S -save-temps -std --target -U -u -v --version --version_number --vsn -W -Wl -Xlinker -x -### Compiler-specific Keywords and Operators Compiler-specific Function, Variable, and Type Att Compiler-specific Intrinsics Compiler-specific Pragmas Other Compiler-specific Features Standard C Implementation Definition Standard C++ Implementation Definition armclang Integrated Assembler armclang Inline Assembler

-fno-builtin

1.19 -fno-builtin

Disables special handling and optimizations of standard C library functions, for example for printf(), strlen(), and malloc().

When compiling without -fno-builtin, the compiler can replace calls to certain standard C library functions with inline code or with calls to other library functions. Subsequently, your re-implementations of the standard C library functions might not be used, and might be removed by the linker.

Default

-fno-builtin is disabled by default.

Example

This example shows the result of compiling the following program with and without -fno-builtin:

#include "stdio.h"

void foo( void )
{
    printf("Hello\n");
}
  1. Compile without -fno-builtin:

    armclang -c -O2 -g --target=arm-arm-none-eabi -mcpu=cortex-a9 -mfpu=none -nostdlib foo.c -o foo.o
  2. Run the following fromelf command to show the disassembled output:

    fromelf --disassemble foo.o -o foo.s
    ...
    ||foo|| PROC
            ADR      r0,|L3.8|
            B        puts
    |L3.8|
            DCD      0x6c6c6548
            DCD      0x0000006f
            ENDP
    ...

    Note:

    The compiler has replaced the printf() function with the puts() function.
  3. Compile with -fno-builtin:

    armclang -c -O2 -g --target=arm-arm-none-eabi -mcpu=cortex-a9 -mfpu=none -nostdlib -fno-builtin foo.c -o foo.o
  4. Run the following fromelf command to show the disassembled output:

    fromelf --disassemble foo.o -o foo.s
    ...
    ||foo|| PROC
            ADR      r0,|L3.8|
            B        printf
    |L3.8|
            DCD      0x6c6c6548
            DCD      0x00000a6f
            ENDP
    ...

    Note:

    The compiler has not replaced the printf() function with the puts() function when using the -fno-builtin option.
Non-ConfidentialPDF file icon PDF version100067_0612_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.