public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Chan Kim" <ckim@etri.re.kr>
To: "U-Boot Mailing List" <u-boot@lists.denx.de>
Subject: link error while u-boot-spl build : undefined ref to `printf` or `strcmp` etc.
Date: Sun, 21 Nov 2021 20:45:13 +0900	[thread overview]
Message-ID: <008a01d7decd$3f3c0900$bdb41b00$@etri.re.kr> (raw)

Hello,

When I build u-boot, I get this error at the end. (during u-boot-spl build).

I've been fixing some link errors by adding config values but I can't figure
out what is wrong with this.

Below is the final command for u-boot-spl build and the error messages.

Can any expert tell me what can be wrong here?

 

( cd spl && aarch64-none-elf-gcc -nostdlib -nostartfiles
-fuse-linker-plugin -flto=28 -Wall -Wstrict-prototypes -Wno-format-security
-fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing
-fno-PIE -Os  -flto=28 -fno-stack-protector -fno-delete-null-pointer-checks
-Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds
-Wno-array-bounds -Wno-stringop-overflow -Wno-maybe-uninitialized
-fmacro-prefix-map=./= -g -fstack-usage -Wno-format-nonliteral
-Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=date-time
-Wno-packed-not-aligned  -ffunction-sections -fdata-sections
-fno-stack-protector -D__KERNEL__ -D__UBOOT__  -DCONFIG_SPL_BUILD  -D__ARM__
-mstrict-align  -fno-common -ffixed-r9  -mgeneral-regs-only    -fno-common
-ffixed-x18 -pipe -march=armv8-a+crc -D__LINUX_ARM_ARCH__=8   -Ispl/include
-Iinclude   -I./arch/arm/include -include ./include/linux/kconfig.h
-nostdinc -isystem
/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/include  -Wl,-T -Wl,u-boot-spl.lds
-Wl,--gc-sections -Wl,-Bstatic -Wl,--gc-sections -Wl,--no-dynamic-linker
-Wl,--build-id=none -Wl,-Ttext -Wl,0x4000000 arch/arm/cpu/armv8/start.o
-Wl,--whole-archive arch/arm/cpu/armv8/built-in.o arch/arm/cpu/built-in.o
arch/arm/lib/built-in.o board/etri/ab21m/built-in.o common/spl/built-in.o
common/init/built-in.o common/built-in.o cmd/built-in.o env/built-in.o
disk/built-in.o drivers/built-in.o dts/built-in.o fs/built-in.o
keep-syms-lto.o -L
/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1 -lgcc -Wl,--no-whole-archive
-Wl,-Map,u-boot-spl.map -o u-boot-spl )

/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld:
/tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function `alloc_simple':

/home/ckim/U-BOOT/u-boot/spl/../common/malloc_simple.c:29: undefined
reference to `printf'

/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld:
/tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function `device_bind_by_name':

/home/ckim/U-BOOT/u-boot/spl/../drivers/core/lists.c:31: undefined reference
to `strcmp'

/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld:
/tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function `board_init_r': 

/home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:697: undefined reference to
`timer_init'

/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld:
/home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:690: undefined reference to
`hang'

/opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/../lib/
gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld:
/home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:633: undefined reference to
`printf'

collect2: error: ld returned 1 exit status

make[1]: *** [scripts/Makefile.spl:509: spl/u-boot-spl] Error 1

make: *** [Makefile:1984: spl/u-boot-spl] Error 2

 

Thank you.

Chan Kim


             reply	other threads:[~2021-11-21 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 11:45 Chan Kim [this message]
2021-11-21 15:30 ` link error while u-boot-spl build : undefined ref to `printf` or `strcmp` etc Ovidiu Panait
2021-11-22  0:42   ` Chan Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='008a01d7decd$3f3c0900$bdb41b00$@etri.re.kr' \
    --to=ckim@etri.re.kr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox