Hi!
I tried rebuilding the AHX plugin under MorphOS 3.13 using the latest SDK for the OS. I think the dead code elimination is too aggressive on GCC 9. What version of GCC did you use to build the plugin? Also, the source on the download page builds 1.2 instead of 1.3.
Thanks in advance!
Rebuilding AHX plugin from source
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Rebuilding AHX plugin from source
I'm on registered MorphOS using FlowStudio.
- airsoftsoftwair
- Posts: 5673
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Rebuilding AHX plugin from source
Yes, you must make sure that the compiler doesn't strip the important symbols in amigaentry.c. I'm still on gcc5 which doesn't strip them but in gcc9 you can probably set a flag or something to tell the compiler to not strip them.
I'll soon upload the 1.3 sources but judging from the history, there's just a single line that is different.
I'll soon upload the 1.3 sources but judging from the history, there's just a single line that is different.
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: Rebuilding AHX plugin from source
I think the flag is __attribute__((used)) in front of the function definition. I'll try that.
I'm on registered MorphOS using FlowStudio.
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: Rebuilding AHX plugin from source
Confirmed!
The GCC9 build is still a lot smaller but seems to work! The following diff should be applied to Hollywood:SDK/includes/hollywood/plugin.h
The GCC9 build is still a lot smaller but seems to work! The following diff should be applied to Hollywood:SDK/includes/hollywood/plugin.h
Code: Select all
diff --git a/System:Applications/Hollywood/SDK/include/hollywood/plugin_old.h b/System:Applications/Hollywood/SDK/include/hollywood/plugin.h
index 279aaa3..3a35944 100644
--- a/System:Applications/Hollywood/SDK/include/hollywood/plugin_old.h
+++ b/System:Applications/Hollywood/SDK/include/hollywood/plugin.h
@@ -96,6 +96,8 @@
#define HW_EXPORT __saveds
#elif defined(HW_WIN32)
#define HW_EXPORT __declspec(dllexport)
+#elif defined(HW_MORPHOS) || defined(HW_AMIGAOS4)
+#define HW_EXPORT __attribute__((used))
#else
#define HW_EXPORT
#endif
I'm on registered MorphOS using FlowStudio.