file-specific or language-specific compiler options, was C vs. -fno-threadsafe-statics

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've acquired an Atmel Studio 7 project that uses Arduino code, customer-supplied

C++ code, other third party C++ code and third-party C code.

The project has warnings disabled because otherwise GNU complains about the option -fno-threadsafe-statics for all the C files.

I'd like to enable warnings, so I'd like to remove the option for just the C files.

How, if at all, can I do that?

 

Edit: better title

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

Last Edited: Mon. Dec 4, 2017 - 02:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you saying that AS7 issues that option by default? I don't think so.

 

(ergo it must be set by something in the .vcxproj so if all else fails edit the XML and remove it).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Are you saying that AS7 issues that option by default? I don't think so.

 

(ergo it must be set by something in the .vcxproj so if all else fails edit the XML and remove it).

I infer that the previous author issued the option on purpose.

He seems to have wanted it badly enough to disable warnings rather than get rid of it.

Since it's ineffective on C files, hence the complaint, I'd like to turn it off just for C files.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As AS7 does not have a "tick box" specifically for that option he must have entered it in the free-form text field for "Miscellaneous" so simply remove it form there (or do as I suggested previously and forget about wading through the IDE trying to find it and instead edit the raw XML for the project files and remove it there)
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For some reason, it took me a while to realize that AS has separate sets of tick boxes and fill-in-the-blank's

for C, C++ and others.

I removed the option for C files only.

I do not know why it was ever there.

My predecessor typed things into two sets of fill-in-the-blank's

and so must have been aware that there were at least two.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods