public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Diekema, Jon (GE Aviation, US)" <Jon.Diekema@ge.com>
To: "Remy Bohmer" <linux@bohmer.net>
Cc: <crossgcc@sourceware.org>
Subject: RE: Need ct-ng recipe for PPC toolset under Cygwin
Date: Wed, 21 Dec 2011 19:55:00 -0000	[thread overview]
Message-ID: <69ABDB41F438EF499C150818A55F635B0DB5D66F@CINMLVEM26.e2k.ad.ge.com> (raw)
In-Reply-To: <CANqCtQJz0vNOHEQX=Xzzm+OaagUxu5X+gtKRv=FF3RW2WN0wcg@mail.gmail.com>

Remy got me started down a successful path with a Canadian build, but
the following patch was needed:

eglibc-2_14 patch: Add protection on the __caddr_t typedef in
usr/include/sys/types.h to avoid problems when caddr_t is defined.

When using ct-nt 1.13.0, the following patch for eglibc-2_14 was needed
for a i686-pc-mingw32-i686-pc-linux-gnu build.

diff --git a/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
new file mode 100644
index 0000000..11b5f8b
--- /dev/null
+++ b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
@@ -0,0 +1,33 @@
+Add protection on the __caddr_t typedef in usr/include/sys/types.h to
avoid problems when caddr_t is defined.
+
+[ALL  ]    i686-pc-linux-gnu-cc   -march=i686 -mtune=i686 -O2
-march=i686   -mtune=i686    -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W
-Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libcpp/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libdecnumber
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libdecnumber/bid -I../libdecnumber
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include  -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder -fno-tree-vectorize -fno-stack-protector  -I. -I.
-I../.././gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/../gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/../include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -o crtbeginS.o -MT crtbeginS.o -MD -MP -MF
crtbeginS.dep -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
-fPIC 	  -c
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/crtstuff.c -DCRT_BEGIN
-DCRTSTUFFS_O
+[ALL  ]    In file included from
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/tsystem.h:90:0,
+[ALL  ]                     from
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/crtstuff.c:61:
+[ERROR]
/opt/ctng/i686-pc-linux-gnu/i686-pc-linux-gnu/sysroot/usr/include/sys/ty
pes.h:117:19: error: two or more data types in declaration specifiers
+[ERROR]
/opt/ctng/i686-pc-linux-gnu/i686-pc-linux-gnu/sysroot/usr/include/sys/ty
pes.h:117:26: error: expected identifier or '(' before ';' token
+
+--- ./posix/sys/types.h	2010-01-26 06:27:38.000000000 -0500
++++ ./posix/sys/types.h	2011-11-17 11:39:03.662925595 -0500
+@@ -113,10 +113,21 @@
+ 
+ #ifdef	__USE_BSD
+ # ifndef __daddr_t_defined
++#  ifndef daddr_t
+ typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++#  else
++#    define __daddr_t daddr_t
++#  endif
+ #  define __daddr_t_defined
+ # endif
++# ifndef __caddr_t_defined
++#  ifndef caddr_t
++typedef __caddr_t caddr_t;
++#  else
++#    define __caddr_t caddr_t
++#  endif
++#  define __caddr_t_defined
++# endif
+ #endif
+ 
+ #if (defined __USE_SVID || defined __USE_XOPEN) && !defined
__key_t_defined

-----Original Message-----
From: linux.bohmer.net@gmail.com [mailto:linux.bohmer.net@gmail.com] On
Behalf Of Remy Bohmer
Sent: Thursday, November 03, 2011 3:14 PM
To: Diekema, Jon (GE Aviation, US)
Cc: crossgcc@sourceware.org
Subject: Re: Need ct-ng recipe for PPC toolset under Cygwin

Hi,

2011/11/3 Diekema, Jon (GE Aviation, US) <Jon.Diekema@ge.com>:
> Under Linux I have zero problems with this recipe, but I need a cross 
> toolset for both the Windows and Linux environments.

Why not build a canadian build under Linux?

With ct-ng on Linux you can build:
1) a linux->target toolchain
2) a linux->mingw toolchain
with these 1 and 2 you can build:
3) a mingw->target toolchain

Some advantages:
* Building the toolchain on Linux takes much less time.
* Much less troubles during the build since you are not bothered by
cygwin quirks.
* The mingw based toolchain performs much better on Windows resulting in
shorter build times as well.
* One Development environment for building all compiler toolchains.

Have Fun!

Kind Regards,

Remy

--
For unsubscribe information see http://sourceware.org/lists.html#faq

      reply	other threads:[~2011-12-21 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 18:20 Diekema, Jon (GE Aviation, US)
2011-11-03 19:14 ` Remy Bohmer
2011-12-21 19:55   ` Diekema, Jon (GE Aviation, US) [this message]

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=69ABDB41F438EF499C150818A55F635B0DB5D66F@CINMLVEM26.e2k.ad.ge.com \
    --to=jon.diekema@ge.com \
    --cc=crossgcc@sourceware.org \
    --cc=linux@bohmer.net \
    /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).