public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Frysinger <vapier@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib: drop i?86-pc-linux-* target support Date: Thu, 10 Feb 2022 01:24:35 +0000 (GMT) [thread overview] Message-ID: <20220210012435.A3DA33858D1E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=462d6942f6be6addbf0a977af366b421810738bb commit 462d6942f6be6addbf0a977af366b421810738bb Author: Mike Frysinger <vapier@gentoo.org> Date: Mon Feb 7 04:57:29 2022 -0500 newlib: drop i?86-pc-linux-* target support This was added 20+ years ago. It seems to have very few (or no users) as it only works on 32-bit x86 GNU/Linux (i.e. glibc) systems, and even then only with old versions of glibc. It hasn't compiled in at least 5 years, but most likely been broken for more like 15 years -- it relies on internal glibc APIs (like linuxthreads), and that code has changed and been deleted significantly since. This single target ends up dragging in a lot of non-trivial code that is hard to keep working, and currently impossible to verify -- the libtool and iconvdata and sys/linux/ code isn't used by anything else, but ends up touching just about every build file in the tree. Punt the target so we can start stripping out all these unique code paths. This commit by itself just disables the target. We'll start deleting the individual unused pieces in followups. Diff: --- newlib/NEWS | 4 ++++ newlib/README | 34 ---------------------------------- newlib/configure | 5 ----- newlib/configure.ac | 5 ----- newlib/configure.host | 40 +--------------------------------------- 5 files changed, 5 insertions(+), 83 deletions(-) diff --git a/newlib/NEWS b/newlib/NEWS index fdca12ab9..d007aac3d 100644 --- a/newlib/NEWS +++ b/newlib/NEWS @@ -1,3 +1,7 @@ +*** Major changes in newlib version 4.3.0: + +- remove i?86-pc-linux-gnu support + *** Major changes in newlib version 4.2.0: - remove use of --cygnus option for automake diff --git a/newlib/README b/newlib/README index c025cb38d..aa48b246f 100644 --- a/newlib/README +++ b/newlib/README @@ -508,40 +508,6 @@ need to add the other targets you're testing to the case statement. Now type make check-target-newlib in the top-level build directory to run the testsuite. -Shared newlib -============= - -newlib uses libtool when it is being compiled natively (with ---target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu -host. This allows newlib to be compiled as a shared library. - -To configure newlib, do the following from your build directory: - -$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) - -configure will recognize that host == target == -i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using -libtool. By default, libtool will build shared and static versions of -newlib. - -To compile a program against shared newlib, do the following (where -target_install_dir = $(install_dir)/i[34567]86-pc-linux-gnu): - -gcc -nostdlib $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm -lgcc - -To run the program, make sure that $(target_install_dir)/lib is listed -in the LD_LIBRARY_PATH environment variable. - -To create a static binary linked against newlib, do the following: - -gcc -nostdlib -static $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm - -libtool can be instructed to produce only static libraries. To build -newlib as a static library only, do the following from your build -directory: - -$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) --disable-shared - Regenerating Configuration Files ================================ diff --git a/newlib/configure b/newlib/configure index a80cf0194..7b2a45868 100755 --- a/newlib/configure +++ b/newlib/configure @@ -12076,11 +12076,6 @@ fi HAVE_ICONVDATA=false -case $host in - i[34567]86-pc-linux-*) - HAVE_ICONVDATA=true - ;; -esac if $HAVE_ICONVDATA; then HAVE_ICONVDATA_TRUE= HAVE_ICONVDATA_FALSE='#' diff --git a/newlib/configure.ac b/newlib/configure.ac index 2e6a80a5f..366fffafc 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -348,11 +348,6 @@ AM_CONDITIONAL(HAVE_DOC, test x$have_multisubdir = xno) AM_CONDITIONAL(HAVE_MULTISUBDIR, test x$have_multisubdir = xyes) HAVE_ICONVDATA=false -case $host in - i[[34567]]86-pc-linux-*) - HAVE_ICONVDATA=true - ;; -esac AM_CONDITIONAL([HAVE_ICONVDATA], $HAVE_ICONVDATA) CRT0= diff --git a/newlib/configure.host b/newlib/configure.host index 893a698ed..4eae14063 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -406,7 +406,7 @@ fi if [ "x${newlib_mb}" = "x" ]; then case "${host}" in - i[34567]86-pc-linux-*|*-*-cygwin*) + *-*-cygwin*) newlib_mb=yes ;; esac @@ -418,21 +418,6 @@ if [ "${newlib_io_float}" = "no" ] ; then newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT" fi -# Verify if shared newlib support is allowed and set appropriate variables -# We don't want to use libtool for platforms that we are not going to -# support shared libraries. This is because it adds executable tests which -# we don't want for most embedded platforms. -case "${host}" in - i[34567]86-pc-linux-*) - use_libtool=yes - have_sys_mach_dir=yes - stdio64_dir=stdio64 - oext=lo - lpfx= - aext=la ;; - *) ;; #shared library not supported for ${host} -esac - # Get the source directories to use for the host. unix_dir is set # to unix to get some standard Unix routines. posix_dir is set to get some # standard Posix routines. sys_dir should supply system dependent routines @@ -530,29 +515,6 @@ case "${host}" in sys_dir=sysvi386 unix_dir=unix ;; - i[34567]86-pc-linux-*) - sys_dir=linux - unix_dir=unix - posix_dir=posix - crt1=crt1.o - crt1_dir=libc/sys/${sys_dir} - gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'` - default_newlib_io_c99_formats="yes" - default_newlib_io_long_double="yes" - default_newlib_io_long_long="yes" - default_newlib_io_pos_args="yes" - #newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD - newlib_cflags="${newlib_cflags} -Wall" - newlib_cflags="${newlib_cflags} -DHAVE_FCNTL" - newlib_cflags="${newlib_cflags} -DHAVE_GETOPT" - newlib_cflags="${newlib_cflags} -D_NO_POSIX_SPAWN" - # --- Required when building a shared library ------------------------ - newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION" - # --- The three lines below are optional ------------------------------ - ##newlib_cflags="${newlib_cflags} -nostdinc" - ##newlib_cflags="${newlib_cflags} -I`newlib-flags --kernel-dir`/include" - ##newlib_cflags="${newlib_cflags} -idirafter ${gcc_dir}include" - ;; m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*) ;;
reply other threads:[~2022-02-10 1:24 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=20220210012435.A3DA33858D1E@sourceware.org \ --to=vapier@sourceware.org \ --cc=newlib-cvs@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: linkBe 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).