Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !81

Propagate LD_FLAGS from Cmake into sac2crc.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Artem Shinkarov requested to merge tema/sac2c:fix-ldflags into develop Oct 23, 2018
  • Overview 0
  • Commits 1
  • Changes 1

We set up LD_FLAGS in cmake/sac2c/config.cmake that should capture differences in OS linking. However, these never get used neither when building sac2c nor in sac2crc. This, for example, causes a failure on ubuntu when compiling the following sac program:

    use Array:all;
    use StdIO:all;

    int main () {
      a = [1,2,3,4];
      b = [a,a];
      a = modarray( modarray( a, [0], 0), [1], 0);
      print(a);
      return 0;
    }

Using the following sac2c flags:

    sac2c -v0 -O0 -noprelude -noinl -specmode aud a.sac

Adding -Xl '-Wl,--allow-shlib-undefined' solves the problem, however this very flag is already defined in LD_FLAGS.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix-ldflags