public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: sid@sources.redhat.com, cgen@sources.redhat.com
Subject: sid cgen cpus broken by absence of pic libiberty
Date: Wed, 02 Feb 2005 07:13:00 -0000	[thread overview]
Message-ID: <vt28y67phl6.fsf@zenia.home> (raw)


I think the SID build is broken for CGEN-based processors.

The libcgencpu.la library, built in sid/component/cgen-cpu, depends on
libiberty.  There are some occasional uses of xmalloc in tracedis.cxx,
but libcgencpu.la also uses files from libopcodes, which use the
"safe-ctype.h" character classification functions.  Fine.

Unfortunately, libiberty no longer builds PIC versions of its .o
files.  It used to, but there was long and highly confusing discussion
about how to fix things in December, which resulted in many large
patches, all of which were eventually reverted.  See the binutils
mailing list.  I can't find the discussion of why H.J. Lu reverted the
hard work he'd done getting libiberty to use libtool, but it sure
looked like a testing nightmare (AIX and an HP-UX x IA64 build were
both brought up as problematic cases).

And if there are no PIC libiberty objects, then libcgencpu.la
certainly can't use libiberty.

Since worthies much worthier than I have struggled with making
libiberty produce PIC object files and failed, I'm inclined to work on
making the opcodes stuff and sid no longer depend on libiberty.  It's
going to involve cringe-inducing patch hunks like this:

*************** cgen_parse_keyword (CGEN_CPU_DESC cd ATT
*** 216,222 ****
    /* Allow letters, digits, and any special characters.  */
    while (((p - start) < (int) sizeof (buf))
  	 && *p
! 	 && (ISALNUM (*p)
  	     || *p == '_'
  	     || strchr (keyword_table->nonalpha_chars, *p)))
      ++p;
--- 216,224 ----
    /* Allow letters, digits, and any special characters.  */
    while (((p - start) < (int) sizeof (buf))
  	 && *p
! 	 && (('a' <= *p && *p <= 'z')
!              || ('A' <= *p && *p <= 'Z')
!              || ('0' <= *p && *p <= '9')
  	     || *p == '_'
  	     || strchr (keyword_table->nonalpha_chars, *p)))
      ++p;

Does that sound reasonable (well, reasonable with a clothespin on the
nose) to folks?

             reply	other threads:[~2005-02-02  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02  7:13 Jim Blandy [this message]
2005-02-02  8:41 ` Doug Evans
2005-02-02 11:18 ` Frank Ch. Eigler

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=vt28y67phl6.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=sid@sources.redhat.com \
    /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).