Opened 8 years ago

Last modified 3 years ago

#1158 new defect

suggestion: avoid OS-specific switch in configure.ac

Reported by: jinmei Owned by: UnAssigned
Priority: medium Milestone: Solaris and other unsupported
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description (last modified by tomek)

I noticed that in #1155 the following change was introduced to configure.ac:

*-solaris*)
[...]
	# In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
	B10_CXXFLAGS="$B10_CXXFLAGS -Wno-missing-braces"
	;;

I have a few concerns with this approach:

  • In general, such OS specific switch is discouraged in autoconf. And, in fact, not all Solaris versions/installments have this problem as some of our buildbot showed. For such "cleaner" Solaris, this setting weakens compiler warning unnecessarily. A better test is to use AC_TRY_COMPILE with using the offending IN6ADDR_ macros and specify -Wno-xxx only when it's necessary.
  • If I understand it correctly, this problem happens only where ASIO headers are directly included (mainly in libasiolink and libasiodns, with (inappropriate) a couple of possible exceptions). We should limit the place of weakening the warning to where it's absolutely necessary.

Subtickets

Change History (6)

comment:1 Changed 8 years ago by jreed

The above example has been changed.

But on our Solaris system:

checking OS family... configure: WARNING: "Unsupported OS: uname returned SunOS" Unknown

And I don't see anything using OS_SOLARIS.

comment:2 Changed 5 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:3 Changed 4 years ago by tomek

  • Milestone changed from Remaining BIND10 tickets to DHCP Outstanding Tasks

As part of bug scrubbing during Kea 1.0, we decided to move a number of tickets to DHCP Outstanding.

comment:4 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

comment:5 Changed 3 years ago by tomek

  • Description modified (diff)
  • Milestone changed from Outstanding Tasks to Solaris-and-exotic-systems

comment:6 Changed 3 years ago by tomek

  • Milestone changed from Solaris-and-exotic-systems to Solaris and other unsupported

Milestone renamed

Note: See TracTickets for help on using tickets.