Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Community Community
  • Project information
    • Project information
    • Activity
    • Members
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • CMakeCMake
  • CommunityCommunity
  • Wiki
  • Doc
  • Cmake
  • Platform_dependent_issues
  • IA64 FPIC problem

IA64 FPIC problem · Changes

Page history
Organize page layout after conversion from mediawiki authored Apr 27, 2018 by Kitware Robot's avatar Kitware Robot
Organize pages into directories and shorter file names.  Use lower-case
names for directories and capitalized names for files.  This produces a
pleasing sort order in the GitLab Wiki navigation page.

Also rename entry page `CMake.md` to `Home.md` to match GitLab Wiki
conventions.
Hide whitespace changes
Inline Side-by-side
doc/cmake/platform_dependent_issues/IA64-FPIC-problem.md 0 → 100644
View page @ d523de26
bar.c:
int i = 0;
void bar()
{
i = 5;
}
foo.c:
extern void bar();
void foo()
{
bar();
}
Compiled with
rm -f libbar.a *.o
gcc -c bar.c
ar cr libbar.a bar.o
gcc -c foo.c
gcc -shared -o libfoo.so foo.o -L. -lbar
Will
fail:
/usr/bin/ld: bar.o: @gprel relocation against dynamic symbol i collect2: ld returned 1 exit status
But, putting:
gcc -fPIC -c bar.c
works.
----
This page was initially populated by conversion from its [original location](https://public.kitware.com/Wiki/CMake_IA64_FPIC_problem) in another wiki.
Clone repository
  • CMake Versions on Linux Distros
  • Contrib
  • Editing Guidelines
  • FAQ
  • Home
  • contrib
    • macros
      • AddCxxTest
      • CompareVersionStrings
      • CopyIfDifferent
      • CreateFinalFile
      • FilterOut
      • ForceAddFlags
      • GatherProjectFiles
      • GenerateProject
      • LibtoolFile
      • ListOperations
View All Pages