Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
eaf7d168
Commit
eaf7d168
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'ticket23846'
parents
85aba48a
0aec613a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket23846
+5
-0
5 additions, 0 deletions
changes/ticket23846
configure.ac
+9
-1
9 additions, 1 deletion
configure.ac
with
14 additions
and
1 deletion
changes/ticket23846
0 → 100644
+
5
−
0
View file @
eaf7d168
o Minor features (build):
- If you pass the "--enable-pic" option to configure, Tor will try to
tell the compiler to build position-independent code suitable to
link into a library. (The default remains -fPIE, for code suitable for a
relocatable executable.) Closes ticket 23846.
This diff is collapsed.
Click to expand it.
configure.ac
+
9
−
1
View file @
eaf7d168
...
...
@@ -55,6 +55,8 @@ AC_ARG_ENABLE(zstd-advanced-apis,
AS_HELP_STRING(--disable-zstd-advanced-apis, [Build without support for zstd's "static-only" APIs.]))
AC_ARG_ENABLE(nss,
AS_HELP_STRING(--enable-nss, [Use Mozilla's NSS TLS library. (EXPERIMENTAL)]))
AC_ARG_ENABLE(pic,
AS_HELP_STRING(--enable-pic, [Build Tor's binaries as position-independent code, suitable to link as a library.]))
if test "x$enable_coverage" != "xyes" -a "x$enable_asserts_in_tests" = "xno" ; then
AC_MSG_ERROR([Can't disable assertions outside of coverage build])
...
...
@@ -1138,6 +1140,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
#error
#endif])], have_clang=yes, have_clang=no)
if test "x$enable_pic" = "xyes"; then
TOR_CHECK_CFLAGS(-fPIC)
fi
if test "x$enable_gcc_hardening" != "xno"; then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
if test "x$have_clang" = "xyes"; then
...
...
@@ -1157,7 +1163,9 @@ m4_ifdef([AS_VAR_IF],[
TOR_CHECK_CFLAGS(-Wstack-protector)
TOR_CHECK_CFLAGS(--param ssp-buffer-size=1)
if test "$bwin32" = "false" && test "$enable_libfuzzer" != "yes" && test "$enable_oss_fuzz" != "yes"; then
TOR_CHECK_CFLAGS(-fPIE)
if test "$enable_pic" != "yes"; then
TOR_CHECK_CFLAGS(-fPIE)
fi
TOR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
fi
TOR_TRY_COMPILE_WITH_CFLAGS(-fwrapv, also_link, CFLAGS_FWRAPV="-fwrapv", true)
...
...
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