libiberty patch - configure/makefile for cygwin

DJ Delorie
Tue Jun 13 20:24:00 GMT 2000

> Shouldn't the EXTRA_INCs stuff already be handled by the definition
> of CC_FOR_TARGET in the toplevel Makefile for target builds?  Or am
> I missing something?

You'd think so, but it doesn't when you're not also building gcc in
the same build (CC_FOR_TARGET only includes the extra incs when
.../gcc/xgcc exists).  The problems I've seen are from building just
the cygwin module under cygwin.  I've attached the relevent code below.

I'm willing to add the includes to the second set of cases in that
snippet, but I don't know what negative effects that might have on
other builds.  Plus, it prevents you from just typing "make" in the
target libiberty directory and expecting it to work.

I'm also not sure that blindly including from newlib just because it's
there is always the right thing to do; it really should reflect the
--with-newlib option.

If you cross compile from, say, Linux, it works like you'd expect.

> The bits for removing strsignal, are probably OK to go ahead and check
> in.

I don't have checkin privs for gcc.

  if [ -f $$r/gcc/xgcc ] ; then \
    if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
      case "$(target_canonical)" in \
        i[3456]86-*-cygwin*) \
          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
          ;; \
        *) \
          echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
	  ;; \
      esac \
    else \
      echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include; \
    fi; \
  else \
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
      echo $(CC); \
    else \
      t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
    fi; \

More information about the Binutils mailing list