Skip to content

Commit

Permalink
enable PIC for compile and disable PIE for linking
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Jun 22, 2023
1 parent 8dffe42 commit 9b54a16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ext/self_crypto/extconf.rb
@@ -1,13 +1,12 @@
require 'mkmf'

$CFLAGS = " -std=c99"
$CFLAGS = "-fPIC -std=c99"
$LDFLAGS = " -no-pie -shared " + $LDFLAGS

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']

pkg_config('stdc++')
pkg_config('self_omemo')

abort "Missing stdc++" unless have_library("stdc++")
abort "Missing omemo" unless have_library("self_omemo")

create_makefile('self_crypto/self_crypto')

0 comments on commit 9b54a16

Please sign in to comment.