Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
nexedi
linux
Commits
3815cbcd
Commit
3815cbcd
authored
Feb 21, 2003
by
Brian Gerst
Committed by
Linus Torvalds
Feb 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Better test for GCC alignment options
Do the test for -falign-xxx vs. -malign-xxx only once.
parent
a3d0a746
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
arch/i386/Makefile
arch/i386/Makefile
+6
-6
No files found.
arch/i386/Makefile
View file @
3815cbcd
...
...
@@ -27,6 +27,8 @@ check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1
# prevent gcc from keeping the stack 16 byte aligned
CFLAGS
+=
$(
call
check_gcc,-mpreferred-stack-boundary
=
2,
)
align
:=
$(
subst
-functions
=
0,,
$(
call
check_gcc,-falign-functions
=
0,-malign-functions
=
0
))
cflags-$(CONFIG_M386)
+=
-march
=
i386
cflags-$(CONFIG_M486)
+=
-march
=
i486
cflags-$(CONFIG_M586)
+=
-march
=
i586
...
...
@@ -37,15 +39,13 @@ cflags-$(CONFIG_MPENTIUMII) += $(call check_gcc,-march=pentium2,-march=i686)
cflags-$(CONFIG_MPENTIUMIII)
+=
$(
call
check_gcc,-march
=
pentium3,-march
=
i686
)
cflags-$(CONFIG_MPENTIUM4)
+=
$(
call
check_gcc,-march
=
pentium4,-march
=
i686
)
cflags-$(CONFIG_MK6)
+=
$(
call
check_gcc,-march
=
k6,-march
=
i586
)
cflags-$(CONFIG_MK7)
+=
$(
call
check_gcc,-march
=
athlon,-march
=
i686
-malign-functions
=
4
)
cflags-$(CONFIG_MK8)
+=
$(
call
check_gcc,-march
=
k8,
$(
call
check_gcc,-march
=
athlon,-march
=
i686
-malign-functions
=
4
))
cflags-$(CONFIG_MCRUSOE)
+=
-march
=
i686
cflags-$(CONFIG_MCRUSOE)
+=
$(
call
check_gcc,-falign-functions
=
0
-falign-jumps
=
0
-falign-loops
=
0,-malign-functions
=
0
-malign-jumps
=
0
-malign-loops
=
0
)
cflags-$(CONFIG_MK7)
+=
$(
call
check_gcc,-march
=
athlon,-march
=
i686
$(align)
-functions
=
4
)
cflags-$(CONFIG_MK8)
+=
$(
call
check_gcc,-march
=
k8,
$(
call
check_gcc,-march
=
athlon,-march
=
i686
$(align)
-functions
=
4
))
cflags-$(CONFIG_MCRUSOE)
+=
-march
=
i686
$(align)
-functions
=
0
$(align)
-jumps
=
0
$(align)
-loops
=
0
cflags-$(CONFIG_MWINCHIPC6)
+=
$(
call
check_gcc,-march
=
winchip-c6,-march
=
i586
)
cflags-$(CONFIG_MWINCHIP2)
+=
$(
call
check_gcc,-march
=
winchip2,-march
=
i586
)
cflags-$(CONFIG_MWINCHIP3D)
+=
-march
=
i586
cflags-$(CONFIG_MCYRIXIII)
+=
$(
call
check_gcc,-march
=
c3,-march
=
i486
)
cflags-$(CONFIG_MCYRIXIII)
+=
$(
call
check_gcc,-falign-functions
=
0
-falign-jumps
=
0
-falign-loops
=
0,-malign-functions
=
0
-malign-jumps
=
0
-malign-loops
=
0
)
cflags-$(CONFIG_MCYRIXIII)
+=
$(
call
check_gcc,-march
=
c3,-march
=
i486
)
$(align)
-functions
=
0
$(align)
-jumps
=
0
$(align)
-loops
=
0
cflags-$(CONFIG_MVIAC3_2)
+=
$(
call
check_gcc,-march
=
c3-2,-march
=
i686
)
CFLAGS
+=
$
(
cflags-y
)
...
...
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