summaryrefslogtreecommitdiffstats
path: root/patches/glibc-2.33-40-g3f5080aedd16/0200-Hack-around-mips-args-to-host-gcc.patch
blob: b58996d61063ddddf685cd4a8a99d56bc5dfc6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 3 Dec 2014 15:05:52 +0100
Subject: [PATCH] Hack around mips args to host-gcc

originally From: "Steven J dot  Hill" <sjhill at realitydiluted dot com>
for Crosstool

In OSELAS.Toolchain we pass -DBOOTSTRAP_GCC in CC. This patch fixes the
header extraction from the glibc, by not passing mips specific flags to
the HOST compiler.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[mol: handle mips64 as well]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 sysdeps/mips/mips32/Makefile     | 4 ++++
 sysdeps/mips/mips64/n64/Makefile | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/sysdeps/mips/mips32/Makefile b/sysdeps/mips/mips32/Makefile
index dec0b024c3a8..dde2ca6bce1d 100644
--- a/sysdeps/mips/mips32/Makefile
+++ b/sysdeps/mips/mips32/Makefile
@@ -1,3 +1,7 @@
+ifeq ($(filter -DBOOTSTRAP_GCC,$(CC)),)
 ifeq ($(filter -mabi=32,$(CC)),)
 CC += -mabi=32
 endif
+else
+CC += -D_MIPS_SZPTR=32
+endif
diff --git a/sysdeps/mips/mips64/n64/Makefile b/sysdeps/mips/mips64/n64/Makefile
index a823f32b53d3..f4112f19a79a 100644
--- a/sysdeps/mips/mips64/n64/Makefile
+++ b/sysdeps/mips/mips64/n64/Makefile
@@ -1,6 +1,10 @@
 # `long double' is a distinct type we support.
 long-double-fcts = yes
 
+ifeq ($(filter -DBOOTSTRAP_GCC,$(CC)),)
 ifeq ($(filter -mabi=64,$(CC)),)
 CC += -mabi=64
 endif
+else
+CC += -D_MIPS_SZPTR=64
+endif