[Vm-dev] NoDbgRegParms another possible fix in the Cog svn tree
gettimothy
gettimothy at zoho.com
Sun Feb 8 19:48:31 UTC 2015
Hi all.
I have been awol due to un-employment freakout for the past month or so; things are somewhat stable and I can devote some time on the
CMake project.
I think I have the solution to autoconf not expanding the NoDbgRegParms on my version of the autotools in build.linux32x86/squeak.cog.v3
SHORT VERSION:
in Cog/platforms/unix/config/config.h.in add the line
#define NoDbgRegParms
in the header files Cog/src/vm/config/
cogit.h
cointerp.h
cointerpmt.h
remove the following construct
#if !defined(NoDbgRegParms)
# define NoDbgRegParms /*empty*/
#endif
Reasoning: In the configure template we define the darn thing as an empty sting by default and only set it to something when we intend to use it for debugging.
LONG VERSION:
Tools versions are:
autoconf (GNU Autoconf) 2.69
gcc (GCC) 4.8.2
in Cog/platforms/unix/config/config.h.in add the line
#define NoDbgRegParms
in Cog/src/vm/config/
cogit.h
cointerp.h
cointerpmt.h
remove the following construct
#if !defined(NoDbgRegParms)
# define NoDbgRegParms /*empty*/
#endif
The following 2 changes are specific to my machine, but should have no bearing on the above.
I note them only for completeness:
1.In each mvm file, I added the following configure variables that are required by my machine:
--without-vm-display-fbdev --without-gl --x-libraries=/usr/lib
2. In each plugins.ext I remove the BochsIA32Plugin as I don't have it installed on my machine.
the ./mvm for each build type in Cog/build.linux32x86/squeak.cog.v3 worked with these changes (prior, the NoDebugRegParms error kicks in) in all the subdirectories:
build
build.assert.itimerheartbeat
build.debug.itimerheartbeat
build.multithreaded
build.multithreaded.debug
build.assert
build.debug
build.itimerheartbeat
build.multithreaded.assert
After each build, ../../../products/XYZ/squeak -version was run and the vm correctly put out the info
i.e.
bash-4.2$ ../../../products/cogmtlinuxht/squeak -version
4.0-3248 #1 Sun Feb 8 12:43:20 EST 2015 gcc 4.8.2 [Production VM]
CoInterpreterMT VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8 Feb 8 2015
StackToRegisterMappingCogit VMMaker.oscog-eem.1039 uuid: 931d69b1-7be3-42dd-8833-1ba325d2b5f2 Feb 8 2015
VM: r3248 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2015-02-04 19:50:56 -0500
Plugins: r3243 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
Linux flipper 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux
My reasoning is as follows.
The error looks like this:
/home/tty/usr/src/smalltalk/CMake.oscog/Cog/src/vm/gcc3x-cointerp.c:1316:14: warning: 'oopisLessThan' used but never defined [enabled by default]
static sqInt oopisLessThan(sqInt anOop, sqInt otherOop) NoDbgRegParms;
The problem is that NoDbgRegParms must be replaced per the following logic in the cogit.h,cointerp.h and cointerpmt.h files
#if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms)
# define NoDbgRegParms __attribute__ ((regparm (0)))
#endif
#if !defined(NoDbgRegParms)
# define NoDbgRegParms /*empty*/
#endif
i.e. either it is removed or replaced with
__attribute__ ((regparm (0)))
For "some reason" it is not and I have been trying to figure out why.
I was rereading the autotools tutorial I have and got to the part about *.in files that configure uses as templates, one of which is config.h.in
On a hunch, I decided to initialize the NoDbgRegParms to empty and ditch the "toggle attempt" in the config files; it seems to have worked.
Summary.
Let me know if
a. the fix is unnacceptable (I will keep digging)
b. more testing is needed.
c. etc.
Cordially,
tty.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150208/c0098130/attachment-0001.htm
More information about the Vm-dev
mailing list