Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5f2bfcce
Commit
5f2bfcce
authored
Sep 16, 2010
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Plain Diff
merge updates of build_mccge.sh and check-cpu
parents
0b3a1807
0876ef05
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
238 additions
and
73 deletions
+238
-73
BUILD/build_mccge.sh
BUILD/build_mccge.sh
+195
-70
BUILD/check-cpu
BUILD/check-cpu
+43
-3
No files found.
BUILD/build_mccge.sh
View file @
5f2bfcce
This diff is collapsed.
Click to expand it.
BUILD/check-cpu
View file @
5f2bfcce
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
# best compiler optimization flags for gcc
# best compiler optimization flags for gcc
# Will return result in:
# Will return result in:
# cpu_arg : Type of CPU
# cpu_arg : Type of CPU
# low_cpu_arg : Type of CPU used up until GCC v3.3
# check_cpu_args : Arguments for GCC compiler settings
# check_cpu_args : Arguments for GCC compiler settings
#
#
...
@@ -33,7 +34,7 @@ check_compiler_cpu_flags () {
...
@@ -33,7 +34,7 @@ check_compiler_cpu_flags () {
case
`
gcc
-dumpmachine
`
in
case
`
gcc
-dumpmachine
`
in
i?86-
*
|
x86_64-
*
)
i?86-
*
|
x86_64-
*
)
if
test
"
$cc_comp
"
-lt
304
;
then
if
test
"
$cc_comp
"
-lt
304
;
then
check_cpu_cflags
=
"-mcpu=
${
cpu_arg
}
"
check_cpu_cflags
=
"-mcpu=
${
low_
cpu_arg
}
"
elif
test
"
$cc_comp
"
-ge
402
;
then
elif
test
"
$cc_comp
"
-ge
402
;
then
check_cpu_cflags
=
"-mtune=native"
check_cpu_cflags
=
"-mtune=native"
else
else
...
@@ -141,9 +142,10 @@ check_cpu () {
...
@@ -141,9 +142,10 @@ check_cpu () {
# detect CPU shortname as used by gcc options
# detect CPU shortname as used by gcc options
# this list is not complete, feel free to add further entries
# this list is not complete, feel free to add further entries
cpu_arg
=
""
cpu_arg
=
""
case
"
$cpu_family
--
$model_name
--
$spu_arch
"
in
low_cpu_arg
=
""
case
"
$cpu_vendor
--
$cpu_family
--
$model_name
--
$spu_arch
"
in
# DEC Alpha
# DEC Alpha
Alpha
*
EV6
*
)
*
Alpha
*
EV6
*
)
cpu_arg
=
"ev6"
;
cpu_arg
=
"ev6"
;
;;
;;
#Core 2 Duo
#Core 2 Duo
...
@@ -172,6 +174,13 @@ check_cpu () {
...
@@ -172,6 +174,13 @@ check_cpu () {
*
Pentium
*
4
*
Mobile
*
)
*
Pentium
*
4
*
Mobile
*
)
cpu_arg
=
"pentium4m"
cpu_arg
=
"pentium4m"
;;
;;
*
Pentium
\(
R
\)
*
\
M
*
)
cpu_arg
=
"pentium-m"
low_cpu_arg
=
"pentium3"
;;
*
Pentium
\(
R
\)
*
\
D
*
)
cpu_arg
=
"prescott"
;;
*
Pentium
*
4
*
)
*
Pentium
*
4
*
)
cpu_arg
=
"pentium4"
cpu_arg
=
"pentium4"
;;
;;
...
@@ -196,6 +205,12 @@ check_cpu () {
...
@@ -196,6 +205,12 @@ check_cpu () {
*
Celeron
*
)
*
Celeron
*
)
cpu_arg
=
"pentium2"
cpu_arg
=
"pentium2"
;;
;;
*
Atom
*
)
cpu_arg
=
"prescott"
;;
*
GenuineIntel
*
)
cpu_arg
=
"pentium"
;;
*
Turion
*
)
*
Turion
*
)
cpu_arg
=
"athlon64"
cpu_arg
=
"athlon64"
;;
;;
...
@@ -205,9 +220,30 @@ check_cpu () {
...
@@ -205,9 +220,30 @@ check_cpu () {
*
Athlon
*
)
*
Athlon
*
)
cpu_arg
=
"athlon"
cpu_arg
=
"athlon"
;;
;;
*
AMD-K7
*
)
cpu_arg
=
"athlon"
;;
*
Athlon
*
XP
\
*
)
cpu_arg
=
"athlon-xp"
;;
*
AMD
*
Sempron
\(
tm
\)
*
)
cpu_arg
=
"athlon-mp"
;;
*
AMD
*
Athlon
\(
tm
\)\
64
*
)
cpu_arg
=
"k8"
;;
*
Opteron
*
)
*
Opteron
*
)
cpu_arg
=
"opteron"
cpu_arg
=
"opteron"
;;
;;
*
Phenom
*
)
cpu_arg
=
"k8"
;;
*
AuthenticAMD
*
)
cpu_arg
=
"k6"
;;
*
VIA
\
*
)
cpu_arg
=
"i686"
;;
# MacOSX / Intel
# MacOSX / Intel
*
i386
*
i486
*
)
*
i386
*
i486
*
)
cpu_arg
=
"pentium-m"
cpu_arg
=
"pentium-m"
...
@@ -239,6 +275,10 @@ check_cpu () {
...
@@ -239,6 +275,10 @@ check_cpu () {
;;
;;
esac
esac
if
test
"x
$low_cpu_arg
"
=
"x"
;
then
low_cpu_arg
=
"
$cpu_arg
"
fi
if
test
-z
"
$cpu_arg
"
;
then
if
test
-z
"
$cpu_arg
"
;
then
if
test
"
$CPUINFO
"
!=
" "
;
then
if
test
"
$CPUINFO
"
!=
" "
;
then
# fallback to uname if necessary
# fallback to uname if necessary
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment