Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
99f722e2
Commit
99f722e2
authored
Jan 16, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Jan 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add ARM64 support.
parent
3f393a65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
utils.h
tools/winegcc/utils.h
+1
-1
winegcc.c
tools/winegcc/winegcc.c
+12
-7
No files found.
tools/winegcc/utils.h
View file @
99f722e2
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
enum
target_cpu
enum
target_cpu
{
{
CPU_x86
,
CPU_x86_64
,
CPU_SPARC
,
CPU_POWERPC
,
CPU_ARM
CPU_x86
,
CPU_x86_64
,
CPU_SPARC
,
CPU_POWERPC
,
CPU_ARM
,
CPU_ARM64
};
};
enum
target_platform
enum
target_platform
...
...
tools/winegcc/winegcc.c
View file @
99f722e2
...
@@ -160,7 +160,8 @@ static const struct
...
@@ -160,7 +160,8 @@ static const struct
{
"x86_64"
,
CPU_x86_64
},
{
"x86_64"
,
CPU_x86_64
},
{
"sparc"
,
CPU_SPARC
},
{
"sparc"
,
CPU_SPARC
},
{
"powerpc"
,
CPU_POWERPC
},
{
"powerpc"
,
CPU_POWERPC
},
{
"arm"
,
CPU_ARM
}
{
"arm"
,
CPU_ARM
},
{
"aarch64"
,
CPU_ARM64
}
};
};
static
const
struct
static
const
struct
...
@@ -223,6 +224,8 @@ static const enum target_cpu build_cpu = CPU_SPARC;
...
@@ -223,6 +224,8 @@ static const enum target_cpu build_cpu = CPU_SPARC;
static
const
enum
target_cpu
build_cpu
=
CPU_POWERPC
;
static
const
enum
target_cpu
build_cpu
=
CPU_POWERPC
;
#elif defined(__arm__)
#elif defined(__arm__)
static
const
enum
target_cpu
build_cpu
=
CPU_ARM
;
static
const
enum
target_cpu
build_cpu
=
CPU_ARM
;
#elif defined(__aarch64__)
static
const
enum
target_cpu
build_cpu
=
CPU_ARM64
;
#else
#else
#error Unsupported CPU
#error Unsupported CPU
#endif
#endif
...
@@ -344,10 +347,10 @@ static int check_platform( struct options *opts, const char *file )
...
@@ -344,10 +347,10 @@ static int check_platform( struct options *opts, const char *file )
{
{
if
(
header
[
4
]
==
2
)
/* 64-bit */
if
(
header
[
4
]
==
2
)
/* 64-bit */
ret
=
(
opts
->
force_pointer_size
==
8
||
ret
=
(
opts
->
force_pointer_size
==
8
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
==
CPU_x86_64
));
(
!
opts
->
force_pointer_size
&&
(
opts
->
target_cpu
==
CPU_x86_64
||
opts
->
target_cpu
==
CPU_ARM64
)
));
else
else
ret
=
(
opts
->
force_pointer_size
==
4
||
ret
=
(
opts
->
force_pointer_size
==
4
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
!=
CPU_x86_64
));
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
!=
CPU_x86_64
&&
opts
->
target_cpu
!=
CPU_ARM64
));
}
}
}
}
close
(
fd
);
close
(
fd
);
...
@@ -370,13 +373,13 @@ static char *get_lib_dir( struct options *opts )
...
@@ -370,13 +373,13 @@ static char *get_lib_dir( struct options *opts )
strcpy
(
p
,
libwine
);
strcpy
(
p
,
libwine
);
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
if
(
p
>
buffer
+
2
&&
(
!
memcmp
(
p
-
2
,
"32"
,
2
)
||
!
memcmp
(
p
-
2
,
"64"
,
2
)))
p
-=
2
;
if
(
p
>
buffer
+
2
&&
(
!
memcmp
(
p
-
2
,
"32"
,
2
)
||
!
memcmp
(
p
-
2
,
"64"
,
2
)))
p
-=
2
;
if
(
opts
->
force_pointer_size
==
4
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
!=
CPU_x86_64
))
if
(
opts
->
force_pointer_size
==
4
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
!=
CPU_x86_64
&&
opts
->
target_cpu
!=
CPU_ARM64
))
{
{
strcpy
(
p
,
"32"
);
strcpy
(
p
,
"32"
);
strcat
(
p
,
libwine
);
strcat
(
p
,
libwine
);
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
if
(
check_platform
(
opts
,
buffer
))
goto
found
;
}
}
if
(
opts
->
force_pointer_size
==
8
||
(
!
opts
->
force_pointer_size
&&
opts
->
target_cpu
==
CPU_x86_64
))
if
(
opts
->
force_pointer_size
==
8
||
(
!
opts
->
force_pointer_size
&&
(
opts
->
target_cpu
==
CPU_x86_64
||
opts
->
target_cpu
==
CPU_ARM64
)
))
{
{
strcpy
(
p
,
"64"
);
strcpy
(
p
,
"64"
);
strcat
(
p
,
libwine
);
strcat
(
p
,
libwine
);
...
@@ -438,7 +441,7 @@ static void compile(struct options* opts, const char* lang)
...
@@ -438,7 +441,7 @@ static void compile(struct options* opts, const char* lang)
strarray_addall
(
comp_args
,
strarray_fromstring
(
DLLFLAGS
,
" "
));
strarray_addall
(
comp_args
,
strarray_fromstring
(
DLLFLAGS
,
" "
));
}
}
if
(
opts
->
target_cpu
==
CPU_x86_64
)
if
(
opts
->
target_cpu
==
CPU_x86_64
||
opts
->
target_cpu
==
CPU_ARM64
)
{
{
strarray_add
(
comp_args
,
"-DWIN64"
);
strarray_add
(
comp_args
,
"-DWIN64"
);
strarray_add
(
comp_args
,
"-D_WIN64"
);
strarray_add
(
comp_args
,
"-D_WIN64"
);
...
@@ -505,7 +508,7 @@ static void compile(struct options* opts, const char* lang)
...
@@ -505,7 +508,7 @@ static void compile(struct options* opts, const char* lang)
strarray_add
(
comp_args
,
"-D__int8=char"
);
strarray_add
(
comp_args
,
"-D__int8=char"
);
strarray_add
(
comp_args
,
"-D__int16=short"
);
strarray_add
(
comp_args
,
"-D__int16=short"
);
strarray_add
(
comp_args
,
"-D__int32=int"
);
strarray_add
(
comp_args
,
"-D__int32=int"
);
if
(
opts
->
target_cpu
==
CPU_x86_64
)
if
(
opts
->
target_cpu
==
CPU_x86_64
||
opts
->
target_cpu
==
CPU_ARM64
)
strarray_add
(
comp_args
,
"-D__int64=long"
);
strarray_add
(
comp_args
,
"-D__int64=long"
);
else
else
strarray_add
(
comp_args
,
"-D__int64=long long"
);
strarray_add
(
comp_args
,
"-D__int64=long long"
);
...
@@ -1399,6 +1402,8 @@ int main(int argc, char **argv)
...
@@ -1399,6 +1402,8 @@ int main(int argc, char **argv)
{
{
if
(
opts
.
target_cpu
==
CPU_x86_64
)
if
(
opts
.
target_cpu
==
CPU_x86_64
)
opts
.
target_cpu
=
CPU_x86
;
opts
.
target_cpu
=
CPU_x86
;
else
if
(
opts
.
target_cpu
==
CPU_ARM64
)
opts
.
target_cpu
=
CPU_ARM
;
opts
.
force_pointer_size
=
4
;
opts
.
force_pointer_size
=
4
;
raw_linker_arg
=
1
;
raw_linker_arg
=
1
;
}
}
...
...
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