This is the mail archive of the gcc-patches@gcc.gnu.org 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: PR27599


I tested the following, with a C-only cross compiler from linux -> darwin

1) GCC trunk. Works
2) trunk + Michael's first patch, which exposes the latent bug. The build didn't fail, but gcc/Makefile had "xmake_file= $(srcdir)/config/ x-darwin $(srcdir)/config/x-linux"m which is wrong and may result in bugs in the future.
3) trunk + first patch + patch below. Works, and now I have "xmake_file= $(srcdir)/config/x-linux"


Shantonu

On May 16, 2006, at 7:03 AM, Michael Matz wrote:

Hi,

On Mon, 15 May 2006, Alexandre Oliva wrote:

On May 15, 2006, Michael Matz <matz@suse.de> wrote:

* config.host: Make assignments to host_xmake_file cumulative.

Ok, thanks

ssen@opendarwin.org mentioned that linux -> darwin cross compiler would
break with the patch because config.host contains a hidden bug since ever,
it currently contains:


case ${target} in
  *-darwin*)
    # Generic darwin host support.
    out_host_hook_obj=host-darwin.o
    host_xmake_file="${host_xmake_file} x-darwin"
    ;;
esac

I.e. selecting on $target. This seems wrong to me, but I can't test any
change there. Can I replace it with testing for $host, ala the patch
below?



Ciao, Michael.

* config.host (*-darwin*): Test $host, not $target.

--- config.host (revision 113823)
+++ config.host (working copy)
@@ -86,11 +86,11 @@ case ${host} in
 esac

 # Common parts for widely ported systems.
-case ${target} in
+case ${host} in
   *-darwin*)
     # Generic darwin host support.
     out_host_hook_obj=host-darwin.o
-    host_xmake_file=x-darwin
+    host_xmake_file="${host_xmake_file} x-darwin"
     ;;
 esac



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