From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7576 invoked by alias); 15 Feb 2011 13:08:11 -0000 Received: (qmail 7389 invoked by uid 22791); 15 Feb 2011 13:08:10 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Feb 2011 13:08:02 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p1FD7hJ9078544 ; Tue, 15 Feb 2011 14:07:43 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [130.79.204.10]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p1FD7gfh069517 ; Tue, 15 Feb 2011 14:07:43 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p1FD7foA085312 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 15 Feb 2011 14:07:42 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Tom Tromey'" , "'Yao Qi'" Cc: "'Pedro Alves'" , References: <4D30E23F.3080103@codesourcery.com> <4D375F44.70504@codesourcery.com> <201101281504.38962.pedro@codesourcery.com> <4D550834.6080807@codesourcery.com> <4D55FAB4.7090001@codesourcery.com> <008d01cbccfe$dd123ab0$9736b010$@muller@ics-cnrs.unistra.fr> In-Reply-To: <008d01cbccfe$dd123ab0$9736b010$@muller@ics-cnrs.unistra.fr> Subject: RE: [rfa/rfc] Build libcommon.a for gdb and gdbserver Date: Tue, 15 Feb 2011 13:20:00 -0000 Message-ID: <000f01cbcd11$5562af60$00280e20$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00318.txt.bz2 I finally managed to get it to compile successfully on my --host=x86_64-w64-mingw32 configuration, with the following changes on top of Tom's patch (Warning the diff output is against cvs HEAD, but I cut out the uninteresting part of the cvonfigure change) It basically just takes the same trick as in gdb/Makefile.in to read in ../intl/config.intl, but adapted to gdb/common subdirectory. the top_builddir make variable is used by that script and must thus be set inside common/Makefile.in I also added some CFLAGS related changes, but have no idea if those are correct, at least the CFLAGS from parent directory is now used when compiling signal.o object. I hope this can be useful to find out a cleaner solution to this problem, Pierre Muller GDB pascal language maintainer Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/common/Makefile.in,v retrieving revision 1.2 diff -u -p -r1.2 Makefile.in --- Makefile.in 12 Feb 2011 02:57:01 -0000 1.2 +++ Makefile.in 15 Feb 2011 12:59:37 -0000 @@ -17,6 +17,7 @@ # along with this program. If not, see . srcdir = @srcdir@ +top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -24,10 +25,19 @@ RANLIB = @RANLIB@ COMMON_CPU_OBJ = @COMMON_CPU_OBJ@ BFD_DIR = ../../bfd + BFD_SRC = $(srcdir)/$(BFD_DIR) BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) +# Where is the INTL library? Typically in ../intl. +INTL = @LIBINTL@ +INTL_DEPS = @INTL_DEP@ +INTL_CFLAGS = @INCINTL@ + -INCLUDES = -I. -I../ -I$(srcdir) -I$(srcdir)/../../include @GDB_INCLUDE@ +INCLUDES = -I. -I../ -I$(srcdir) -I$(srcdir)/../../include \ + @GDB_INCLUDE@ $(INTL_CFLAGS) + +ALL_CFLAGS=$(CFLAGS) libcommon_a_OBJS = signals.o $(COMMON_CPU_OBJ) libcommon_a_SOURCES = signals.c $(COMMON_CPU_SRC) @@ -37,6 +47,7 @@ all: libcommon.a signals.o: $(srcdir)/signals.c $(COMPILE) $(srcdir)/signals.c + COMPILE = source='$<' object='$@' libtool=no $(CC) $(DEFS) $(INCLUDES) @GDB_FLAGS@ $(CPPFLAGS) $(ALL_CFLAGS) -c # Implicit rules Index: configure =================================================================== RCS file: /cvs/src/src/gdb/common/configure,v retrieving revision 1.1 diff -u -p -r1.1 configure --- configure 11 Feb 2011 09:57:25 -0000 1.1 +++ configure 15 Feb 2011 12:59:37 -0000 @@ -1,12 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. -# +# Generated by GNU Autoconf 2.64 for common 0.0. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -130,6 +128,20 @@ export LC_ALL LANGUAGE=C export LANGUAGE +# If we haven't got the data from the intl directory, +# assume NLS is disabled. +USE_NLS=no +LIBINTL= +LIBINTL_DEP= +INCINTL= +XGETTEXT= +GMSGFMT= +POSUB= + +if test -f ../../intl/config.intl; then + . ../../intl/config.intl +fi + # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -525,8 +537,7 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -test -n "$DJDIR" || exec 7<&0 &1 +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -546,28 +557,35 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="." -ac_subst_vars='LTLIBOBJS +PACKAGE_NAME='common' +PACKAGE_TARNAME='common' +PACKAGE_VERSION='0.0' +PACKAGE_STRING='common 0.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_unique_file="gdb_signals.h" +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE GDB_INCLUDE GDB_FLAGS COMMON_CPU_SRC COMMON_CPU_OBJ -SET_MAKE -GMAKE_FALSE -GMAKE_TRUE -MAKE -AUTOHEADER -AUTOCONF -ACLOCAL RANLIB +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR OBJEXT EXEEXT ac_ct_CC @@ -575,6 +593,29 @@ CPPFLAGS LDFLAGS CFLAGS CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM target_os target_vendor target_cpu @@ -624,11 +665,16 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +LIBINTL +INTL_DEP +INCINTL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_dependency_tracking enable_gdbserver +enable_maintainer_mode ' ac_precious_vars='build_alias host_alias