Hi John, Since this will be on your local installation, there's really no right or wrong way to do it. Like you said, if you toggle the *DEPRECATED_ENABLE identifier, then it unpoisons everything else; you may not want to do that. If you remove the poison from the header file, then you may unknowingly use it elsewhere. The real issue, the way I see it, is that boot.h uses SPMCR, when it shouldn't. Therefore I would recommend removing the check from boot.h.
And of course the real fix should be done in avr-libc. Eric > -----Original Message----- > From: avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org > [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org] On > Behalf Of John Beard > Sent: Thursday, May 30, 2013 9:06 AM > To: avr-libc-dev@nongnu.org > Subject: [avr-libc-dev] SPMCR poisoning workaround for ATmega128 > > Hi, > > I have run in bug #36410 while trying to compile for a mega128: > > In file included from main.c:13:0: > /usr/lib/gcc/avr/4.7.0/../../../avr/include/avr/boot.h:112:16: > error: attempt to use poisoned "SPMCR" > > The poisoning is in iom128.h, line 1246: > > #pragma GCC poison SPMCR > > I know this is in the bug tracker, but I was wondering how best to > patch my > local code for now. I could remove the poison from iom128.h, toggle > __AVR_LIBC_DEPRECATED_ENABLE__ (but also unpoison everything else), or > define out the check in boot.h for this device. > > Which of these (or some other alternative) is most advisable? > > Best regards, > > John > > _______________________________________________ > AVR-libc-dev mailing list > AVR-libc-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/avr-libc-dev _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev