Opened 9 years ago

Closed 8 years ago

#241 closed defect (fixed)

libc: build failure with newer gcc/binutils

Reported by: abwillis Owned by: bird
Priority: normal Milestone: libc-0.6.5
Component: libc Version: 0.6
Severity: normal Keywords:
Cc:

Description (last modified by bird)

With newer gcc/binutils fnstsw changes from using %ax to %eax: src/msun/i387/fenv.c

int
_STD(feupdateenv)(const fenv_t *envp)
{
-	int mxcsr, status;
+	int mxcsr;
+        uint16_t status;

	__fnstsw(&status);
	if (__HAS_SSE())
		__stmxcsr(&mxcsr);
	else
		mxcsr = 0;
	fesetenv(envp);
	feraiseexcept((mxcsr | status) & FE_ALL_EXCEPT);
	return (0);
}

The code is incorrectly using int (32-bit) for a 16-bit type (FSW).

Change History (3)

comment:1 Changed 8 years ago by bird

  • Description modified (diff)
  • Milestone set to libc-0.6.5
  • Status changed from new to accepted
  • Summary changed from libc build failure to libc: build failure with newer gcc/binutils
  • Version changed from 0.7 to 0.6

comment:2 Changed 8 years ago by bird

  • Status changed from accepted to assigned

comment:3 Changed 8 years ago by bird

  • Resolution set to fixed
  • Status changed from assigned to closed

Corrected this in r3765 and r3766.

Note: See TracTickets for help on using tickets.