Sorry to reopen this topic after such a long time, but as I didn't find any pointer to this problem anywhere, this should be the right spot to add my 2 cents.
I just had a similar problem.
My problem was, that I added a driver to the BSP with a custom *_sw.tcl file, and afterwards I got "undefined reference to `alt_ic_isr_register'".
The resolution to this is stated in the Nios2 Software Developer's Handbook Chapter 8 (Exception Handling):
--- Quote Start ---
A driver can publish its interrupt API support by way of a software property. The driver’s <driver name>_sw.tcl file uses the set_sw_property command to set supported_interrupt_apis to either legacy_interrupt_api,
enhanced_interrupt_api, or both.
Drivers supporting the enhanced API always publish that support. If supported_interrupt_apis is undefined, the SBT assumes that the driver only
supports the legacy API.
Starting in 9.1, all Altera device drivers support both APIs. These drivers can be used in a BSP along with legacy drivers. The SBT determines whether the legacy API is required, and implements it only if it is required. If there are no drivers requiring the legacy API, the BSP implements the enhanced API.
A driver can be written to support only the enhanced API. However, you cannot combine such a driver with legacy drivers.
--- Quote End ---
So if one of the drivers does not work with the Enhanced API, it will be disabled, leading to this problem.
Maybe Altera considers it good style to surround every alt_ic_isr_register() with
# ifdef NIOS2_EIC_PRESENT
alt_ic_isr_register()# else
alt_isr_register()# endif
I have seen code, though, that maps alt_ic_isr_register() to alt_isr_register(), but I have no clue when this comes active.
But my components in question did support the enhanced API (or better, it does not use interrupts at all, for the moment), so I added
set_sw_property supported_interrupt_apis enhanced_interrupt_api
to the _sw.tcl, and alt_ic_isr_register() was there again.