From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Newlib <newlib@sourceware.org>
Subject: ucsconv.c:66: undefined reference to `_iconv_to_ucs_ces'
Date: Fri, 18 Mar 2022 15:49:22 +0100 [thread overview]
Message-ID: <2955930f-2207-2a2a-310c-5458b399794c@embedded-brains.de> (raw)
Hello,
we have a couple of tests in RTEMS which use iconv functions. I get a
linker error with the recent Newlib, for example:
[1621/4384] Linking
/tmp/sh/b-rtems/arm/fvp_cortex_r52/testsuites/fstests/fsdosfsname01.exe
/opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld:
/opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/lib/thumb/cortex-r52/hard/libc.a(libc_a-ucsconv.o):
in function `ucs_based_conversion_open':
/home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:66:
undefined reference to `_iconv_to_ucs_ces'
/opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld:
/home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:66:
undefined reference to `_iconv_to_ucs_ces'
/opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld:
/home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:78:
undefined reference to `_iconv_from_ucs_ces'
/opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld:
/home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:78:
undefined reference to `_iconv_from_ucs_ces'
Previously, we had in a Makefile.am this:
diff --git a/newlib/libc/iconv/ces/Makefile.am
b/newlib/libc/iconv/ces/Makefile.am
deleted file mode 100644
index f59401305..000000000
--- a/newlib/libc/iconv/ces/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS)
-
-GENERAL_SOURCES = \
- utf-8.c \
- utf-16.c \
- ucs-2.c \
- us-ascii.c \
- ucs-4.c \
- ucs-2-internal.c \
- ucs-4-internal.c \
- cesbi.c \
- table.c \
- table-pcs.c \
- euc.c
-
-## The following interfaces are EL/IX level 2
-if ELIX_LEVEL_1
-ELIX_SOURCES = \
- utf-8.c \
- utf-16.c \
- ucs-2.c \
- us-ascii.c \
- ucs-4.c \
- ucs-2-internal.c \
- ucs-4-internal.c \
- cesbi.c \
- table.c \
- table-pcs.c \
- euc.c
-else
-ELIX_SOURCES =
-endif
-
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
-lib_a_CFLAGS = $(AM_CFLAGS)
This was replaced by:
diff --git a/newlib/libc/iconv/ces/Makefile.inc
b/newlib/libc/iconv/ces/Makefile.inc
new file mode 100644
index 000000000..6fb933970
--- /dev/null
+++ b/newlib/libc/iconv/ces/Makefile.inc
@@ -0,0 +1,19 @@
+if ENABLE_NEWLIB_ICONV
+
+## The following interfaces are EL/IX level 2
+if ELIX_LEVEL_1
+libc_a_SOURCES += \
+ %D%/utf-8.c \
+ %D%/utf-16.c \
+ %D%/ucs-2.c \
+ %D%/us-ascii.c \
+ %D%/ucs-4.c \
+ %D%/ucs-2-internal.c \
+ %D%/ucs-4-internal.c \
+ %D%/cesbi.c \
+ %D%/table.c \
+ %D%/table-pcs.c \
+ %D%/euc.c
+endif
+
+endif
I have no idea what this ELIX_LEVEL_1 stuff is supposed to do. In
particular, I don't understand the previous Makefile.am:
lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
It seems the source files end up in lib_a_SOURCES at least once no
matter how ELIX_LEVEL_1 is defined.
This is no longer the case for the Makefile.inc variant. This
contradicts a bit with the new newlib/libc/iconv/lib/Makefile.inc:
if ENABLE_NEWLIB_ICONV
libc_a_SOURCES += \
%D%/aliasesi.c \
%D%/ucsconv.c \
%D%/nullconv.c \
%D%/iconv.c \
%D%/aliasesbi.c \
%D%/iconvnls.c
## The following interfaces are EL/IX level 2
if !ELIX_LEVEL_1
libc_a_SOURCES += \
%D%/aliasesi.c \
%D%/ucsconv.c \
%D%/nullconv.c \
%D%/iconv.c \
%D%/aliasesbi.c \
%D%/iconvnls.c
endif
endif
LIBC_CHEWOUT_FILES += %D%/iconv.def
Here, the files are also added at least once to libc_a_SOURCES (if
ENABLE_NEWLIB_ICONV is true).
Should be just remove this ELIX_LEVEL_1 handling in the iconv directory?
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
reply other threads:[~2022-03-18 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2955930f-2207-2a2a-310c-5458b399794c@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=newlib@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).