Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure check for -faligned-new needs to include header #1232

Closed
veripoolbot opened this issue Oct 15, 2017 · 3 comments
Closed

configure check for -faligned-new needs to include header #1232

veripoolbot opened this issue Oct 15, 2017 · 3 comments
Assignees
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jeff Bush (@jbush001)
Original Redmine Issue: 1232 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


There is a check in the configure script to see if -faligned-new works correctly. The test program looks like this:

int
main ()
{
     int* a=new int;
     delete a;
}
</code>

If I run this program on MacOS 10.12.6 with command line tools 9.0, it links correctly. However, if I include the header <new> at the top, it will fail:

Undefined symbols for architecture x86_64:
  "operator delete(void*, std::align_val_t)", referenced from:
       _main in foo-779f7f.o

So, the problem is that the test program passes, but then verilator fails to link because it does pull in the <new> header. The configure test program should probably include this header.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-10-15T14:38:08Z


Please give git a try.

Fixed in git (I hope) towards 3.916.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jeff Bush (@jbush001)
Original Date: 2017-10-15T15:50:35Z


That fixes it, thanks for the quick turnaround!

checking whether g++ accepts -faligned-new... no

...

Build complete!

Now type 'make test' to test.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-11-25T20:48:00Z


In 3.916.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants