This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix shared library build for libiberty

> 	* (WIN32LIBADD): Use -L../libiberty/.libs instead
> 	of -L../libiberty/pic.

Oh crap, this is bad.  Can we arrange for both the old way and the new
way to work?  I don't want to become incompatible with other modules
if I don't have to, as libiberty is used all over the place and
coordinating the needed changes would be a mess.

> 	(AC_PROG_CC_C_O): Removed.
> 	(OUTPUT_OPTION): Removed.
> 	(NO_MINUS_C_MINUS_O): Removed.

Could you explain why?

>  COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
> +LTCOMPILE = $(LIBTOOL) --mode=compile $(COMPILE.c)
> +
> +.c.lo:
> +	$(LTCOMPILE) -c -o $@ $<
>  # Just to make sure we don't use a built-in rule with VPATH
>  .c.o:
>  	false

If you read the .c.o comment, you'll see that the .c.lo rule must also
be "false".  This is the vpath problem I was talking about - the .c.lo
rule causes in-srcdir builds to link the wrong objects if the other
rules don't happen to match.

> +# (alphabetical), and add them to REQUIRED_OFILES/REQUIRED_LTOFILES, or

Sigh, too bad we can't automate this, but we can't use gnumake yet.

Hmmm... I wonder if maint-tool can be tweaked to use one of the lists
to update the others?  At least it will occasionally fix any
inconsistencies.  (Don't do this yet!  One thing at a time.)

> +# Also run "make maint-deps" to build the new rules.

Good idea to add this comment.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]