1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

Sync patches with DOS line endings that became corrupted

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2011-07-22 10:04:04 +01:00
parent e803c58ffb
commit c9c14a198d
8 changed files with 796 additions and 796 deletions
@@ -1,75 +1,75 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313307agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.227.141.78 with SMTP id l14mr16920947wbu.128.1294533919168;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id w30si33755908wbd.17.2011.01.08.16.45.18;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDo; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 6/7] ARM: detect BX availibility at build time
Date: Sun, 9 Jan 2011 01:45:09 +0100
Message-Id: <1294533910-19305-7-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The "use BX" option is now a suggestion that BX be used if available.
Use a macro to detect if BX is available at build time. If so, and
the user requested it be used, then use it. Otherwise, error out.
Macro courtesy Khem RAJ:
http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 4 +++-
libc/sysdeps/linux/arm/bits/arm_asm.h | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 227b90c..9aa9e56 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -33,4 +33,6 @@ config COMPILE_IN_THUMB_MODE
config USE_BX
bool "Use BX in function return"
help
- Use BX instruction for THUMB aware architectures.
+ Say 'y' to use BX to return from functions on your thumb-aware
+ processor. Say 'y' if you need to use interworking. Say 'n' if not.
+ It is safe to say 'y' even if you're not doing interworking.
diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h
index 1d87df6..921c9a3 100644
--- a/libc/sysdeps/linux/arm/bits/arm_asm.h
+++ b/libc/sysdeps/linux/arm/bits/arm_asm.h
@@ -24,5 +24,12 @@
#define THUMB1_ONLY 1
#endif
-#endif /* _ARM_ASM_H */
+#if defined(__USE_BX__)
+# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
+ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
+ )
+# error Use of BX was requested, but is not available on the target processor.
+# endif /* ARCH level */
+#endif /* __USE_BX__ */
+#endif /* _ARM_ASM_H */
--
1.7.1
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313307agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.227.141.78 with SMTP id l14mr16920947wbu.128.1294533919168;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id w30si33755908wbd.17.2011.01.08.16.45.18;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDo; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 6/7] ARM: detect BX availibility at build time
Date: Sun, 9 Jan 2011 01:45:09 +0100
Message-Id: <1294533910-19305-7-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The "use BX" option is now a suggestion that BX be used if available.
Use a macro to detect if BX is available at build time. If so, and
the user requested it be used, then use it. Otherwise, error out.
Macro courtesy Khem RAJ:
http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 4 +++-
libc/sysdeps/linux/arm/bits/arm_asm.h | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 227b90c..9aa9e56 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -33,4 +33,6 @@ config COMPILE_IN_THUMB_MODE
config USE_BX
bool "Use BX in function return"
help
- Use BX instruction for THUMB aware architectures.
+ Say 'y' to use BX to return from functions on your thumb-aware
+ processor. Say 'y' if you need to use interworking. Say 'n' if not.
+ It is safe to say 'y' even if you're not doing interworking.
diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h
index 1d87df6..921c9a3 100644
--- a/libc/sysdeps/linux/arm/bits/arm_asm.h
+++ b/libc/sysdeps/linux/arm/bits/arm_asm.h
@@ -24,5 +24,12 @@
#define THUMB1_ONLY 1
#endif
-#endif /* _ARM_ASM_H */
+#if defined(__USE_BX__)
+# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
+ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
+ )
+# error Use of BX was requested, but is not available on the target processor.
+# endif /* ARCH level */
+#endif /* __USE_BX__ */
+#endif /* _ARM_ASM_H */
--
1.7.1
@@ -1,65 +1,65 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313304agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.227.155.75 with SMTP id r11mr17188266wbw.3.1294533918432;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id k3si33753340wbx.29.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDf; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 5/7] ARM: #include <bits/arm_asm.h> where __USE_BX__ is used
Date: Sun, 9 Jan 2011 01:45:08 +0100
Message-Id: <1294533910-19305-6-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The check for __USE_BX__ will be available in bits/arm_asm.h,
so the latter must be included wherever the former is used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
ldso/ldso/arm/dl-startup.h | 1 +
libc/sysdeps/linux/arm/sysdep.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h
index a95389d..2dfdaff 100644
--- a/ldso/ldso/arm/dl-startup.h
+++ b/ldso/ldso/arm/dl-startup.h
@@ -7,6 +7,7 @@
*/
#include <features.h>
+#include <bits/arm_asm.h>
#if !defined(__thumb__)
__asm__(
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index 013f88c..e498695 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -21,6 +21,7 @@
#define _LINUX_ARM_SYSDEP_H 1
#include <common/sysdep.h>
+#include <bits/arm_asm.h>
#include <sys/syscall.h>
/* For Linux we can use the system call table in the header file
--
1.7.1
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313304agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.227.155.75 with SMTP id r11mr17188266wbw.3.1294533918432;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id k3si33753340wbx.29.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClHDf; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 5/7] ARM: #include <bits/arm_asm.h> where __USE_BX__ is used
Date: Sun, 9 Jan 2011 01:45:08 +0100
Message-Id: <1294533910-19305-6-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The check for __USE_BX__ will be available in bits/arm_asm.h,
so the latter must be included wherever the former is used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
ldso/ldso/arm/dl-startup.h | 1 +
libc/sysdeps/linux/arm/sysdep.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h
index a95389d..2dfdaff 100644
--- a/ldso/ldso/arm/dl-startup.h
+++ b/ldso/ldso/arm/dl-startup.h
@@ -7,6 +7,7 @@
*/
#include <features.h>
+#include <bits/arm_asm.h>
#if !defined(__thumb__)
__asm__(
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index 013f88c..e498695 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -21,6 +21,7 @@
#define _LINUX_ARM_SYSDEP_H 1
#include <common/sysdep.h>
+#include <bits/arm_asm.h>
#include <sys/syscall.h>
/* For Linux we can use the system call table in the header file
--
1.7.1
@@ -1,45 +1,45 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313309agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.216.173.7 with SMTP id u7mr612034wel.50.1294533919433;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id e10si33752027wer.68.2011.01.08.16.45.19;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClJDu; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 7/7] ARM: remove EABI/OABI selection
Date: Sun, 9 Jan 2011 01:45:10 +0100
Message-Id: <1294533910-19305-8-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be properly setup for the default ABI.
When installing-headers, there are two cases:
- NPTL: no issue, a cross-compiler is already expected
- LinuxThreads: no issue, EABI/OABI has no impact on installed headers.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 11 -----------
libc/sysdeps/linux/arm/Makefile.arch | 9 +++++++--
libc/sysdeps/linux/arm/bits/huge_val.h | 4 ++--
3 files changed, 9 insertions(+), 15 deletions(-)
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313309agb;
Sat, 8 Jan 2011 16:45:20 -0800 (PST)
Received: by 10.216.173.7 with SMTP id u7mr612034wel.50.1294533919433;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id e10si33752027wer.68.2011.01.08.16.45.19;
Sat, 08 Jan 2011 16:45:19 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClJDu; Sun, 09 Jan 2011 01:45:18 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 7/7] ARM: remove EABI/OABI selection
Date: Sun, 9 Jan 2011 01:45:10 +0100
Message-Id: <1294533910-19305-8-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be properly setup for the default ABI.
When installing-headers, there are two cases:
- NPTL: no issue, a cross-compiler is already expected
- LinuxThreads: no issue, EABI/OABI has no impact on installed headers.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 11 -----------
libc/sysdeps/linux/arm/Makefile.arch | 9 +++++++--
libc/sysdeps/linux/arm/bits/huge_val.h | 4 ++--
3 files changed, 9 insertions(+), 15 deletions(-)
Index: git/libc/sysdeps/linux/arm/Makefile.arch
===================================================================
--- git.orig/libc/sysdeps/linux/arm/Makefile.arch
@@ -1,215 +1,215 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313303agb;
Sat, 8 Jan 2011 16:45:18 -0800 (PST)
Received: by 10.227.98.158 with SMTP id q30mr1255804wbn.151.1294533917314;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id r3si33749838wbr.54.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDS; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 3/7] ARM: remove sub-arch/variants selection from menuconfig
Date: Sun, 9 Jan 2011 01:45:06 +0100
Message-Id: <1294533910-19305-4-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be correctly set up to generate
appropriate code for the target variant.
This exposes the Thumb option, as it is no longer auto-selected.
The "Use BX" no longer depends on supported CPU to be selected,
so it now defaults to 'n' as it shall work by default on CPUs
that do not have BX.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 19 -------
extra/Configs/Config.arm | 125 ++--------------------------------------------
2 files changed, 5 insertions(+), 139 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 2a16908..09741a6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -332,25 +332,6 @@ ifeq ($(TARGET_ARCH),arm)
OPTIMIZATION+=-fstrict-aliasing
CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN)+=-mlittle-endian
CPU_CFLAGS-$(ARCH_BIG_ENDIAN)+=-mbig-endian
- CPU_CFLAGS-$(CONFIG_GENERIC_ARM)+=
- CPU_CFLAGS-$(CONFIG_ARM610)+=-mtune=arm610 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM710)+=-mtune=arm710 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM7TDMI)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM720T)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM920T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM922T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM926T)+=-mtune=arm9e -march=armv5te
- CPU_CFLAGS-$(CONFIG_ARM10T)+=-mtune=arm10tdmi -march=armv5t
- CPU_CFLAGS-$(CONFIG_ARM1136JF_S)+=-mtune=arm1136jf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZ_S)+=-mtune=arm1176jz-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZF_S)+=-mtune=arm1176jzf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM_SA110)+=-mtune=strongarm110 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index c9c40d4..6c75a00 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -30,129 +30,14 @@ config CONFIG_ARM_EABI
endchoice
-choice
- prompt "Target Processor Type"
- default CONFIG_GENERIC_ARM
- help
- This is the processor type of your CPU. This information is used for
- optimizing purposes. To build a library that will run on all ARMCPU
- types (albeit not optimally fast), you can specify "Generic Arm" here.
- If you pick anything other than "Generic Arm", there is no guarantee
- that uClibc will even run on anything other than the selected
- processor type.
-
- Here are the settings recommended for greatest speed:
- - "Generic Arm" select this if your compiler is already setup to
- optimize things properly, or if you want to run on pretty much
- everything, or you just don't much care.
- - For anything else, pick the ARM core type that best matches the
- cpu you will be using on your device.
-
- If you don't know what to do, choose "Generic Arm".
-
-config CONFIG_GENERIC_ARM
- bool "Generic Arm"
-
-config CONFIG_ARM610
- bool "Arm 610"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM710
- bool "Arm 710"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM7TDMI
- bool "Arm 7TDMI"
- select ARCH_HAS_NO_MMU
- select HAS_THUMB
-
-config CONFIG_ARM720T
- bool "Arm 720T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM920T
- bool "Arm 920T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM922T
- bool "Arm 922T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM926T
- bool "Arm 926T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM10T
- bool "Arm 10T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1136JF_S
- bool "Arm 1136JF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZ_S
- bool "Arm 1176JZ-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZF_S
- bool "Arm 1176JZF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_CORTEX_M3
- bool "Arm Cortex-M3"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_CORTEX_M1
- bool "Arm Cortex-M1"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_SA110
- bool "Intel StrongArm SA-110"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_SA1100
- bool "Intel StrongArm SA-1100"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_XSCALE
- bool "Intel Xscale"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_IWMMXT
- bool "Intel Xscale With WMMX PXA27x"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-endchoice
-
-config HAS_THUMB
- bool
-
-config FORCE_THUMB
- bool
- select HAS_THUMB
- select COMPILE_IN_THUMB_MODE
- select USE_BX
-
config COMPILE_IN_THUMB_MODE
- bool
+ bool "Build using Thumb mode"
+ select USE_BX
+ help
+ Say 'y' here to force building uClibc in thumb mode.
+ Say 'n' to use your compiler's default mode.
config USE_BX
bool "Use BX in function return"
- default y
- depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313303agb;
Sat, 8 Jan 2011 16:45:18 -0800 (PST)
Received: by 10.227.98.158 with SMTP id q30mr1255804wbn.151.1294533917314;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id r3si33749838wbr.54.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:17 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDS; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 3/7] ARM: remove sub-arch/variants selection from menuconfig
Date: Sun, 9 Jan 2011 01:45:06 +0100
Message-Id: <1294533910-19305-4-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Rely on the compiler to be correctly set up to generate
appropriate code for the target variant.
This exposes the Thumb option, as it is no longer auto-selected.
The "Use BX" no longer depends on supported CPU to be selected,
so it now defaults to 'n' as it shall work by default on CPUs
that do not have BX.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 19 -------
extra/Configs/Config.arm | 125 ++--------------------------------------------
2 files changed, 5 insertions(+), 139 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index 2a16908..09741a6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -332,25 +332,6 @@ ifeq ($(TARGET_ARCH),arm)
OPTIMIZATION+=-fstrict-aliasing
CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN)+=-mlittle-endian
CPU_CFLAGS-$(ARCH_BIG_ENDIAN)+=-mbig-endian
- CPU_CFLAGS-$(CONFIG_GENERIC_ARM)+=
- CPU_CFLAGS-$(CONFIG_ARM610)+=-mtune=arm610 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM710)+=-mtune=arm710 -march=armv3
- CPU_CFLAGS-$(CONFIG_ARM7TDMI)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM720T)+=-mtune=arm7tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM920T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM922T)+=-mtune=arm9tdmi -march=armv4t
- CPU_CFLAGS-$(CONFIG_ARM926T)+=-mtune=arm9e -march=armv5te
- CPU_CFLAGS-$(CONFIG_ARM10T)+=-mtune=arm10tdmi -march=armv5t
- CPU_CFLAGS-$(CONFIG_ARM1136JF_S)+=-mtune=arm1136jf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZ_S)+=-mtune=arm1176jz-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM1176JZF_S)+=-mtune=arm1176jzf-s -march=armv6
- CPU_CFLAGS-$(CONFIG_ARM_SA110)+=-mtune=strongarm110 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
- CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index c9c40d4..6c75a00 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -30,129 +30,14 @@ config CONFIG_ARM_EABI
endchoice
-choice
- prompt "Target Processor Type"
- default CONFIG_GENERIC_ARM
- help
- This is the processor type of your CPU. This information is used for
- optimizing purposes. To build a library that will run on all ARMCPU
- types (albeit not optimally fast), you can specify "Generic Arm" here.
- If you pick anything other than "Generic Arm", there is no guarantee
- that uClibc will even run on anything other than the selected
- processor type.
-
- Here are the settings recommended for greatest speed:
- - "Generic Arm" select this if your compiler is already setup to
- optimize things properly, or if you want to run on pretty much
- everything, or you just don't much care.
- - For anything else, pick the ARM core type that best matches the
- cpu you will be using on your device.
-
- If you don't know what to do, choose "Generic Arm".
-
-config CONFIG_GENERIC_ARM
- bool "Generic Arm"
-
-config CONFIG_ARM610
- bool "Arm 610"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM710
- bool "Arm 710"
- select ARCH_HAS_MMU
-
-config CONFIG_ARM7TDMI
- bool "Arm 7TDMI"
- select ARCH_HAS_NO_MMU
- select HAS_THUMB
-
-config CONFIG_ARM720T
- bool "Arm 720T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM920T
- bool "Arm 920T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM922T
- bool "Arm 922T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM926T
- bool "Arm 926T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM10T
- bool "Arm 10T"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1136JF_S
- bool "Arm 1136JF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZ_S
- bool "Arm 1176JZ-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM1176JZF_S
- bool "Arm 1176JZF-S"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_CORTEX_M3
- bool "Arm Cortex-M3"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_CORTEX_M1
- bool "Arm Cortex-M1"
- select ARCH_HAS_NO_MMU
- select FORCE_THUMB
-
-config CONFIG_ARM_SA110
- bool "Intel StrongArm SA-110"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_SA1100
- bool "Intel StrongArm SA-1100"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_XSCALE
- bool "Intel Xscale"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-config CONFIG_ARM_IWMMXT
- bool "Intel Xscale With WMMX PXA27x"
- select ARCH_HAS_MMU
- select HAS_THUMB
-
-endchoice
-
-config HAS_THUMB
- bool
-
-config FORCE_THUMB
- bool
- select HAS_THUMB
- select COMPILE_IN_THUMB_MODE
- select USE_BX
-
config COMPILE_IN_THUMB_MODE
- bool
+ bool "Build using Thumb mode"
+ select USE_BX
+ help
+ Say 'y' here to force building uClibc in thumb mode.
+ Say 'n' to use your compiler's default mode.
config USE_BX
bool "Use BX in function return"
- default y
- depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1
@@ -1,172 +1,172 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313301agb;
Sat, 8 Jan 2011 16:45:17 -0800 (PST)
Received: by 10.216.186.82 with SMTP id v60mr20017574wem.56.1294533916559;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id o13si33755824wee.56.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClFDL; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 2/7] ARM: introduce blind options to select & force THUMB mode
Date: Sun, 9 Jan 2011 01:45:05 +0100
Message-Id: <1294533910-19305-3-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Add three new blind options to set use of Thumb mode:
- COMPILE_IN_THUMB_MODE
- if set, CFLAGS will contain -mthumb
- if unset, the compiler's default is used
- HAS_THUMB
- CPUS with Thumb instruction set can select this
- use of BX depends on this
- FORCE_THUMB
- CPUs that are Thumb-only must select this
- this selects: HAS_THUMB, COMPILE_IN_THUMB_MODE and USE_BX
Also, remove leading space in Rules.mak.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 7 ++++---
extra/Configs/Config.arm | 31 ++++++++++++++++++++++++++++---
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index eecdc64..2a16908 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -348,9 +348,10 @@ ifeq ($(TARGET_ARCH),arm)
CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3 -mthumb
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1 -mthumb
+ CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
+ CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
ifeq ($(TARGET_ARCH),mips)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 3b90e67..c9c40d4 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -64,70 +64,95 @@ config CONFIG_ARM710
config CONFIG_ARM7TDMI
bool "Arm 7TDMI"
select ARCH_HAS_NO_MMU
+ select HAS_THUMB
config CONFIG_ARM720T
bool "Arm 720T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM920T
bool "Arm 920T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM922T
bool "Arm 922T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM926T
bool "Arm 926T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM10T
bool "Arm 10T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1136JF_S
bool "Arm 1136JF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZ_S
bool "Arm 1176JZ-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZF_S
bool "Arm 1176JZF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_CORTEX_M3
bool "Arm Cortex-M3"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_CORTEX_M1
bool "Arm Cortex-M1"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_SA110
bool "Intel StrongArm SA-110"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_SA1100
bool "Intel StrongArm SA-1100"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_XSCALE
bool "Intel Xscale"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_IWMMXT
bool "Intel Xscale With WMMX PXA27x"
select ARCH_HAS_MMU
+ select HAS_THUMB
endchoice
+config HAS_THUMB
+ bool
+
+config FORCE_THUMB
+ bool
+ select HAS_THUMB
+ select COMPILE_IN_THUMB_MODE
+ select USE_BX
+
+config COMPILE_IN_THUMB_MODE
+ bool
+
config USE_BX
bool "Use BX in function return"
default y
- depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
+ depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313301agb;
Sat, 8 Jan 2011 16:45:17 -0800 (PST)
Received: by 10.216.186.82 with SMTP id v60mr20017574wem.56.1294533916559;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id o13si33755824wee.56.2011.01.08.16.45.16;
Sat, 08 Jan 2011 16:45:16 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClFDL; Sun, 09 Jan 2011 01:45:16 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 2/7] ARM: introduce blind options to select & force THUMB mode
Date: Sun, 9 Jan 2011 01:45:05 +0100
Message-Id: <1294533910-19305-3-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
Add three new blind options to set use of Thumb mode:
- COMPILE_IN_THUMB_MODE
- if set, CFLAGS will contain -mthumb
- if unset, the compiler's default is used
- HAS_THUMB
- CPUS with Thumb instruction set can select this
- use of BX depends on this
- FORCE_THUMB
- CPUs that are Thumb-only must select this
- this selects: HAS_THUMB, COMPILE_IN_THUMB_MODE and USE_BX
Also, remove leading space in Rules.mak.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
Rules.mak | 7 ++++---
extra/Configs/Config.arm | 31 ++++++++++++++++++++++++++++---
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/Rules.mak b/Rules.mak
index eecdc64..2a16908 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -348,9 +348,10 @@ ifeq ($(TARGET_ARCH),arm)
CPU_CFLAGS-$(CONFIG_ARM_SA1100)+=-mtune=strongarm1100 -march=armv4
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
CPU_CFLAGS-$(CONFIG_ARM_XSCALE)+=-march=armv5te -Wa,-mcpu=xscale
- CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3 -mthumb
- CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1 -mthumb
+ CPU_CFLAGS-$(CONFIG_ARM_IWMMXT)+=-march=iwmmxt -Wa,-mcpu=iwmmxt -mabi=iwmmxt
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M3)+=-mcpu=cortex-m3
+ CPU_CFLAGS-$(CONFIG_ARM_CORTEX_M1)+=-mcpu=cortex-m1
+ CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
endif
ifeq ($(TARGET_ARCH),mips)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 3b90e67..c9c40d4 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -64,70 +64,95 @@ config CONFIG_ARM710
config CONFIG_ARM7TDMI
bool "Arm 7TDMI"
select ARCH_HAS_NO_MMU
+ select HAS_THUMB
config CONFIG_ARM720T
bool "Arm 720T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM920T
bool "Arm 920T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM922T
bool "Arm 922T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM926T
bool "Arm 926T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM10T
bool "Arm 10T"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1136JF_S
bool "Arm 1136JF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZ_S
bool "Arm 1176JZ-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM1176JZF_S
bool "Arm 1176JZF-S"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_CORTEX_M3
bool "Arm Cortex-M3"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_CORTEX_M1
bool "Arm Cortex-M1"
select ARCH_HAS_NO_MMU
- select USE_BX
+ select FORCE_THUMB
config CONFIG_ARM_SA110
bool "Intel StrongArm SA-110"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_SA1100
bool "Intel StrongArm SA-1100"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_XSCALE
bool "Intel Xscale"
select ARCH_HAS_MMU
+ select HAS_THUMB
config CONFIG_ARM_IWMMXT
bool "Intel Xscale With WMMX PXA27x"
select ARCH_HAS_MMU
+ select HAS_THUMB
endchoice
+config HAS_THUMB
+ bool
+
+config FORCE_THUMB
+ bool
+ select HAS_THUMB
+ select COMPILE_IN_THUMB_MODE
+ select USE_BX
+
+config COMPILE_IN_THUMB_MODE
+ bool
+
config USE_BX
bool "Use BX in function return"
default y
- depends on !CONFIG_GENERIC_ARM && !CONFIG_ARM610 && !CONFIG_ARM710
+ depends on HAS_THUMB
help
Use BX instruction for THUMB aware architectures.
--
1.7.1
@@ -1,39 +1,39 @@
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313305agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.216.153.210 with SMTP id f60mr573848wek.114.1294533918335;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id n4si33737071wej.152.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDX; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 4/7] ARM: transform the EABI/OABI choice into a boolean
Date: Sun, 9 Jan 2011 01:45:07 +0100
Message-Id: <1294533910-19305-5-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The CONFIG_ARM_OABI option is never used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
Delivered-To: raj.khem@gmail.com
Received: by 10.90.86.4 with SMTP id j4cs313305agb;
Sat, 8 Jan 2011 16:45:19 -0800 (PST)
Received: by 10.216.153.210 with SMTP id f60mr573848wek.114.1294533918335;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Return-Path: <yann.morin.1998@anciens.enib.fr>
Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123])
by mx.google.com with ESMTP id n4si33737071wej.152.2011.01.08.16.45.17;
Sat, 08 Jan 2011 16:45:18 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) client-ip=80.12.242.123;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of yann.morin.1998@anciens.enib.fr) smtp.mail=yann.morin.1998@anciens.enib.fr
Received: from roazhon.bzh.lan ([90.32.245.227])
by mwinf5d24 with ME
id tClC1f0024v5z3u03ClGDX; Sun, 09 Jan 2011 01:45:17 +0100
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: uclibc@uclibc.org
Cc: Khem Raj <raj.khem@gmail.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Carmelo AMOROSO <carmelo.amoroso@st.com>
Subject: [PATCH 4/7] ARM: transform the EABI/OABI choice into a boolean
Date: Sun, 9 Jan 2011 01:45:07 +0100
Message-Id: <1294533910-19305-5-git-send-email-yann.morin.1998@anciens.enib.fr>
X-Mailer: git-send-email 1.7.1
In-Reply-To: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
References: <1294533910-19305-1-git-send-email-yann.morin.1998@anciens.enib.fr>
The CONFIG_ARM_OABI option is never used.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
---
extra/Configs/Config.arm | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
Index: git/extra/Configs/Config.arm
===================================================================
--- git.orig/extra/Configs/Config.arm
@@ -1,183 +1,183 @@
Upstream-Status: Pending
This patch is made by xin.zhong@intel.com to implement these supported
features in mkfs.btrfs:
* populate fs image from a directory while creating it
* reduce minimum size of the created image from 256MB to around 24MB
* while creating image use the specified device name rather than output.img
Patch tested and incorporated in poky by:
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/06/20
diff --git a/file-item.c b/file-item.c
index 9732282..aed42c3 100644
--- a/file-item.c
+++ b/file-item.c
@@ -193,7 +193,7 @@ int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 alloc_end,
u64 bytenr, char *data, size_t len)
{
- int ret;
+ int ret = 0;
struct btrfs_key file_key;
struct btrfs_key found_key;
u64 next_offset = (u64)-1;
diff --git a/mkfs.c b/mkfs.c
index 57c88f9..e953a33 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -36,7 +36,7 @@
#include <uuid/uuid.h>
#include <linux/fs.h>
#include <ctype.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "kerncompat.h"
#include "ctree.h"
#include "disk-io.h"
@@ -517,7 +517,6 @@ static int add_inode_items(struct btrfs_trans_handle *trans,
fail:
return ret;
}
-
static int add_xattr_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 objectid,
const char *file_name)
@@ -532,8 +531,10 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
ret = llistxattr(file_name, xattr_list, XATTR_LIST_MAX);
if (ret < 0) {
- fprintf(stderr, "get a list of xattr failed for %s\n",
- file_name);
+ if(errno == ENOTSUP)
+ return 0;
+ fprintf(stderr, "get a list of xattr failed for %s errno %d\n",
+ file_name, errno);
return ret;
}
if (ret == 0)
@@ -546,8 +547,11 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
ret = getxattr(file_name, cur_name, cur_value, XATTR_SIZE_MAX);
if (ret < 0) {
- fprintf(stderr, "get a xattr value failed for %s\n",
- cur_name);
+ if(errno == ENOTSUP)
+ return 0;
+ fprintf(stderr, "get a xattr value failed for %s attr %s errno %d\n",
+ file_name, cur_name, errno);
+ return ret;
}
ret = btrfs_insert_xattr_item(trans, root, cur_name,
@@ -563,7 +567,6 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
return ret;
}
-
static int custom_alloc_extent(struct btrfs_root *root, u64 num_bytes,
u64 hint_byte, struct btrfs_key *ins)
{
@@ -923,27 +926,27 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
fprintf(stderr, "add_inode_items failed\n");
goto fail;
}
-
ret = add_xattr_item(trans, root,
cur_inum, cur_file->d_name);
if (ret) {
fprintf(stderr, "add_xattr_item failed\n");
- goto fail;
+ if(ret != -ENOTSUP)
+ goto fail;
}
-
if (S_ISDIR(st.st_mode)) {
dir_entry = malloc(sizeof(struct directory_name_entry));
dir_entry->dir_name = cur_file->d_name;
dir_entry->path = make_path(parent_dir_entry->path,
cur_file->d_name);
dir_entry->inum = cur_inum;
- list_add_tail(&dir_entry->list, &dir_head->list);
+ list_add_tail(&dir_entry->list, &dir_head->list);
} else if (S_ISREG(st.st_mode)) {
ret = add_file_items(trans, root, &cur_inode,
cur_inum, parent_inum, &st,
cur_file->d_name, out_fd);
if (ret) {
- fprintf(stderr, "add_file_items failed\n");
+ fprintf(stderr, "add_file_items failed %s\n",
+ cur_file->d_name);
goto fail;
}
} else if (S_ISLNK(st.st_mode)) {
@@ -987,7 +990,7 @@ static int create_chunks(struct btrfs_trans_handle *trans,
u64 chunk_size;
u64 meta_type = BTRFS_BLOCK_GROUP_METADATA;
u64 data_type = BTRFS_BLOCK_GROUP_DATA;
- u64 minimum_data_chunk_size = 64 * 1024 * 1024;
+ u64 minimum_data_chunk_size = 8 * 1024 * 1024;
u64 i;
int ret;
@@ -1062,7 +1065,6 @@ static u64 size_sourcedir(char *dir_name, u64 sectorsize,
char path[512];
char *file_name = "temp_file";
FILE *file;
- u64 minimum_data_size = 256 * 1024 * 1024; /* 256MB */
u64 default_chunk_size = 8 * 1024 * 1024; /* 8MB */
u64 allocated_meta_size = 8 * 1024 * 1024; /* 8MB */
u64 allocated_total_size = 20 * 1024 * 1024; /* 20MB */
@@ -1101,9 +1103,6 @@ static u64 size_sourcedir(char *dir_name, u64 sectorsize,
*num_of_meta_chunks_ret = num_of_meta_chunks;
- if (total_size < minimum_data_size)
- total_size = minimum_data_size;
-
return total_size;
}
@@ -1158,9 +1157,9 @@ int main(int ac, char **av)
char *source_dir = NULL;
int source_dir_set = 0;
- char *output = "output.img";
u64 num_of_meta_chunks = 0;
u64 size_of_data = 0;
+ u64 source_dir_size = 0;
while(1) {
int c;
@@ -1224,8 +1223,6 @@ int main(int ac, char **av)
fprintf(stderr, "Illegal nodesize %u\n", nodesize);
exit(1);
}
- if (source_dir_set)
- ac++;
ac = ac - optind;
if (ac == 0)
print_usage();
@@ -1257,17 +1254,19 @@ int main(int ac, char **av)
block_count = dev_block_count;
} else {
ac = 0;
- fd = open_target(output);
+ file = av[optind++];
+ fd = open_target(file);
if (fd < 0) {
fprintf(stderr, "unable to open the %s\n", file);
exit(1);
}
- file = output;
first_fd = fd;
first_file = file;
- block_count = size_sourcedir(source_dir, sectorsize,
+ source_dir_size = size_sourcedir(source_dir, sectorsize,
&num_of_meta_chunks, &size_of_data);
+ if(block_count < source_dir_size)
+ block_count = source_dir_size;
ret = zero_output_file(fd, block_count, sectorsize);
if (ret) {
fprintf(stderr, "unable to zero the output file\n");
Upstream-Status: Pending
This patch is made by xin.zhong@intel.com to implement these supported
features in mkfs.btrfs:
* populate fs image from a directory while creating it
* reduce minimum size of the created image from 256MB to around 24MB
* while creating image use the specified device name rather than output.img
Patch tested and incorporated in poky by:
Nitin A Kamble <nitin.a.kamble@intel.com> 2011/06/20
diff --git a/file-item.c b/file-item.c
index 9732282..aed42c3 100644
--- a/file-item.c
+++ b/file-item.c
@@ -193,7 +193,7 @@ int btrfs_csum_file_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 alloc_end,
u64 bytenr, char *data, size_t len)
{
- int ret;
+ int ret = 0;
struct btrfs_key file_key;
struct btrfs_key found_key;
u64 next_offset = (u64)-1;
diff --git a/mkfs.c b/mkfs.c
index 57c88f9..e953a33 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -36,7 +36,7 @@
#include <uuid/uuid.h>
#include <linux/fs.h>
#include <ctype.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "kerncompat.h"
#include "ctree.h"
#include "disk-io.h"
@@ -517,7 +517,6 @@ static int add_inode_items(struct btrfs_trans_handle *trans,
fail:
return ret;
}
-
static int add_xattr_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 objectid,
const char *file_name)
@@ -532,8 +531,10 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
ret = llistxattr(file_name, xattr_list, XATTR_LIST_MAX);
if (ret < 0) {
- fprintf(stderr, "get a list of xattr failed for %s\n",
- file_name);
+ if(errno == ENOTSUP)
+ return 0;
+ fprintf(stderr, "get a list of xattr failed for %s errno %d\n",
+ file_name, errno);
return ret;
}
if (ret == 0)
@@ -546,8 +547,11 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
ret = getxattr(file_name, cur_name, cur_value, XATTR_SIZE_MAX);
if (ret < 0) {
- fprintf(stderr, "get a xattr value failed for %s\n",
- cur_name);
+ if(errno == ENOTSUP)
+ return 0;
+ fprintf(stderr, "get a xattr value failed for %s attr %s errno %d\n",
+ file_name, cur_name, errno);
+ return ret;
}
ret = btrfs_insert_xattr_item(trans, root, cur_name,
@@ -563,7 +567,6 @@ static int add_xattr_item(struct btrfs_trans_handle *trans,
return ret;
}
-
static int custom_alloc_extent(struct btrfs_root *root, u64 num_bytes,
u64 hint_byte, struct btrfs_key *ins)
{
@@ -923,27 +926,27 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
fprintf(stderr, "add_inode_items failed\n");
goto fail;
}
-
ret = add_xattr_item(trans, root,
cur_inum, cur_file->d_name);
if (ret) {
fprintf(stderr, "add_xattr_item failed\n");
- goto fail;
+ if(ret != -ENOTSUP)
+ goto fail;
}
-
if (S_ISDIR(st.st_mode)) {
dir_entry = malloc(sizeof(struct directory_name_entry));
dir_entry->dir_name = cur_file->d_name;
dir_entry->path = make_path(parent_dir_entry->path,
cur_file->d_name);
dir_entry->inum = cur_inum;
- list_add_tail(&dir_entry->list, &dir_head->list);
+ list_add_tail(&dir_entry->list, &dir_head->list);
} else if (S_ISREG(st.st_mode)) {
ret = add_file_items(trans, root, &cur_inode,
cur_inum, parent_inum, &st,
cur_file->d_name, out_fd);
if (ret) {
- fprintf(stderr, "add_file_items failed\n");
+ fprintf(stderr, "add_file_items failed %s\n",
+ cur_file->d_name);
goto fail;
}
} else if (S_ISLNK(st.st_mode)) {
@@ -987,7 +990,7 @@ static int create_chunks(struct btrfs_trans_handle *trans,
u64 chunk_size;
u64 meta_type = BTRFS_BLOCK_GROUP_METADATA;
u64 data_type = BTRFS_BLOCK_GROUP_DATA;
- u64 minimum_data_chunk_size = 64 * 1024 * 1024;
+ u64 minimum_data_chunk_size = 8 * 1024 * 1024;
u64 i;
int ret;
@@ -1062,7 +1065,6 @@ static u64 size_sourcedir(char *dir_name, u64 sectorsize,
char path[512];
char *file_name = "temp_file";
FILE *file;
- u64 minimum_data_size = 256 * 1024 * 1024; /* 256MB */
u64 default_chunk_size = 8 * 1024 * 1024; /* 8MB */
u64 allocated_meta_size = 8 * 1024 * 1024; /* 8MB */
u64 allocated_total_size = 20 * 1024 * 1024; /* 20MB */
@@ -1101,9 +1103,6 @@ static u64 size_sourcedir(char *dir_name, u64 sectorsize,
*num_of_meta_chunks_ret = num_of_meta_chunks;
- if (total_size < minimum_data_size)
- total_size = minimum_data_size;
-
return total_size;
}
@@ -1158,9 +1157,9 @@ int main(int ac, char **av)
char *source_dir = NULL;
int source_dir_set = 0;
- char *output = "output.img";
u64 num_of_meta_chunks = 0;
u64 size_of_data = 0;
+ u64 source_dir_size = 0;
while(1) {
int c;
@@ -1224,8 +1223,6 @@ int main(int ac, char **av)
fprintf(stderr, "Illegal nodesize %u\n", nodesize);
exit(1);
}
- if (source_dir_set)
- ac++;
ac = ac - optind;
if (ac == 0)
print_usage();
@@ -1257,17 +1254,19 @@ int main(int ac, char **av)
block_count = dev_block_count;
} else {
ac = 0;
- fd = open_target(output);
+ file = av[optind++];
+ fd = open_target(file);
if (fd < 0) {
fprintf(stderr, "unable to open the %s\n", file);
exit(1);
}
- file = output;
first_fd = fd;
first_file = file;
- block_count = size_sourcedir(source_dir, sectorsize,
+ source_dir_size = size_sourcedir(source_dir, sectorsize,
&num_of_meta_chunks, &size_of_data);
+ if(block_count < source_dir_size)
+ block_count = source_dir_size;
ret = zero_output_file(fd, block_count, sectorsize);
if (ret) {
fprintf(stderr, "unable to zero the output file\n");
@@ -9,11 +9,11 @@ Index: clutter-box2d-0.10.0/box2d/Source/Common/b2Math.h
--- clutter-box2d-0.10.0.orig/box2d/Source/Common/b2Math.h 2008-12-16 06:42:10.000000000 -0800
+++ clutter-box2d-0.10.0/box2d/Source/Common/b2Math.h 2011-07-20 16:41:02.046430743 -0700
@@ -60,7 +60,7 @@
#ifdef _MSC_VER
return _finite(x) != 0;
#else
- return finite(x) != 0;
+ return std::isfinite(x) != 0;
#endif
}
#ifdef _MSC_VER
return _finite(x) != 0;
#else
- return finite(x) != 0;
+ return std::isfinite(x) != 0;
#endif
}