Suggest -fPIC instead of -fpic

On platforms where they're different -fpic can fail so -fPIC is a
better option to direct users to.
This commit is contained in:
Olly Betts 2024-07-26 08:30:43 +12:00
parent e585e58ec0
commit e5b968f67e
2 changed files with 4 additions and 4 deletions

View File

@ -501,8 +501,8 @@ compiler. For example:
<div class="code"><pre>
% swig -c++ -java example.i
% g++ -c -fpic example.cxx
% g++ -c -fpic example_wrap.cxx -I/usr/java/j2sdk1.4.1/include -I/usr/java/j2sdk1.4.1/include/linux
% g++ -c -fPIC example.cxx
% g++ -c -fPIC example_wrap.cxx -I/usr/java/j2sdk1.4.1/include -I/usr/java/j2sdk1.4.1/include/linux
% g++ -shared example.o example_wrap.o -o libexample.so
</pre></div>

View File

@ -370,11 +370,11 @@ for a few common platforms is shown below:</p>
<div class="shell"><pre>
# Build a shared library for Solaris
gcc -fpic -c example.c example_wrap.c -I/usr/local/include
gcc -fPIC -c example.c example_wrap.c -I/usr/local/include
ld -G example.o example_wrap.o -o example.so
# Build a shared library for Linux
gcc -fpic -c example.c example_wrap.c -I/usr/local/include
gcc -fPIC -c example.c example_wrap.c -I/usr/local/include
gcc -shared example.o example_wrap.o -o example.so
</pre></div>