Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
haskell-wasm
GHC
Commits
c00a4bd6
Commit
c00a4bd6
authored
1 year ago
by
Ben Gamari
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
configure: Probe stage0 link flags
For consistency with later stages and CC.
parent
6354e1da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.ac
+3
-2
3 additions, 2 deletions
configure.ac
m4/fp_prog_cc_linker_target.m4
+7
-6
7 additions, 6 deletions
m4/fp_prog_cc_linker_target.m4
with
10 additions
and
8 deletions
configure.ac
+
3
−
2
View file @
c00a4bd6
...
...
@@ -670,8 +670,9 @@ FP_CC_SUPPORTS_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_CXX_OPTS_STAGE0
FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_CXX_OPTS_STAGE1])
FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_CXX_OPTS_STAGE2])
FP_PROG_CC_LINKER_TARGET([CONF_CC_OPTS_STAGE1], [CONF_GCC_LINKER_OPTS_STAGE1])
FP_PROG_CC_LINKER_TARGET([CONF_CC_OPTS_STAGE2], [CONF_GCC_LINKER_OPTS_STAGE2])
FP_PROG_CC_LINKER_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_GCC_LINKER_OPTS_STAGE0])
FP_PROG_CC_LINKER_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_GCC_LINKER_OPTS_STAGE1])
FP_PROG_CC_LINKER_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_GCC_LINKER_OPTS_STAGE2])
dnl ** See whether cc used as a linker supports -no-pie
FP_GCC_SUPPORTS_NO_PIE
...
...
This diff is collapsed.
Click to expand it.
m4/fp_prog_cc_linker_target.m4
+
7
−
6
View file @
c00a4bd6
...
...
@@ -2,8 +2,9 @@
# -------------------
# Check to see if the C compiler used as a linker supports `--target`
#
# $1 - Variable which contains the options passed to the C compiler when compiling a C file
# $2 - Variable which contains the options passed to the C compiler when used as
# $1 - The compiler
# $2 - Variable which contains the options passed to the C compiler when compiling a C file
# $3 - Variable which contains the options passed to the C compiler when used as
# a linker
AC_DEFUN([FP_PROG_CC_LINKER_TARGET],
[
...
...
@@ -11,17 +12,17 @@ AC_DEFUN([FP_PROG_CC_LINKER_TARGET],
echo 'int foo() { return 0; }' > conftest1.c
echo 'int main() { return 0; }' > conftest2.c
"$
{CC}
" $$
1
-c conftest1.c || AC_MSG_ERROR([Failed to compile conftest1.c])
"$
{CC}
" $$
1
-c conftest2.c || AC_MSG_ERROR([Failed to compile conftest2.c])
"$
1
" $$
2
-c conftest1.c || AC_MSG_ERROR([Failed to compile conftest1.c])
"$
1
" $$
2
-c conftest2.c || AC_MSG_ERROR([Failed to compile conftest2.c])
if test "$target_cpu" = "javascript"
then
# See Note [Don't pass --target to emscripten toolchain] in GHC.Toolchain.Program
CONF_CC_SUPPORTS_TARGET=NO
AC_MSG_RESULT([no])
elif "$CC" $$
2
--target=$LlvmTarget -o conftest conftest1.o conftest2.o;
elif "$CC" $$
3
--target=$LlvmTarget -o conftest conftest1.o conftest2.o;
then
$
2
="--target=$LlvmTarget $$
2
"
$
3
="--target=$LlvmTarget $$
3
"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment