Revision: 3356 Author: eliot Date: 2015-05-23 19:03:15 -0700 (Sat, 23 May 2015) Log Message: ----------- Move definition of VM_VERSION out of various sqConfig.h files and into platforms/Cross/vm/sqVirtualMachine.h.
Make unix autoconf oblivious of the VM_VERSION.VM_RELEASE version tag, allowing one to rebuild without a time-consuming configure if already configured. To support this add a main routine to platforms/Cross/vm/sqSCCSVersion.h that allows it to be compiled to answer the VM_VERSION.VM_RELEASE as defined by platforms/Cross/vm/{sqVirtualMachine.h,sqSCCSVersion.h}. Modify the linux makeproduct scripts to use makealldirty & add makeproductclean scripts.
Modified Paths: -------------- branches/Cog/build.linux32ARM/makeproduct branches/Cog/build.linux32x86/makeproduct branches/Cog/build.linux64x64/makeproduct branches/Cog/platforms/Cross/vm/sq.h branches/Cog/platforms/Cross/vm/sqSCCSVersion.h branches/Cog/platforms/Cross/vm/sqVirtualMachine.h branches/Cog/platforms/Mac OS/vm/config.h branches/Cog/platforms/Mac OS/vm/sqConfig.h branches/Cog/platforms/Plan9/vm/config.h branches/Cog/platforms/iOS/vm/iPhone/config.h branches/Cog/platforms/unix/config/Makefile.in branches/Cog/platforms/unix/config/Makefile.install branches/Cog/platforms/unix/config/acinclude.m4 branches/Cog/platforms/unix/config/config.h.in branches/Cog/platforms/unix/config/configure branches/Cog/platforms/unix/config/configure.ac branches/Cog/platforms/unix/config/make.cfg.in branches/Cog/platforms/unix/vm/Makefile.in branches/Cog/platforms/unix/vm/sqConfig.h branches/Cog/platforms/win32/vm/sqConfig.h branches/Cog/platforms/win32/vm/sqPlatformSpecific.h branches/Cog/platforms/win32/vm/sqWin32.h branches/Cog/platforms/win32/vm/sqWin32Main.c branches/Cog/platforms/win32/vm/sqWin32Prefs.c branches/Cog/platforms/win32/vm/sqWin32Prefs.h
Added Paths: ----------- branches/Cog/build.linux32ARM/makeproductclean branches/Cog/build.linux32x86/makeproductclean branches/Cog/build.linux64x64/makeproductclean branches/Cog/platforms/unix/config/getversion.c
Modified: branches/Cog/build.linux32ARM/makeproduct =================================================================== --- branches/Cog/build.linux32ARM/makeproduct 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/build.linux32ARM/makeproduct 2015-05-24 02:03:15 UTC (rev 3356) @@ -2,7 +2,7 @@ trap 'exit 2' HUP INT PIPE TERM for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3 squeak.stack.spur squeak.stack.v3; do if test -d "$d"; then - (cd $d;./makeallclean "$@") + (cd $d;./makealldirty "$@") else echo no $d directory found fi
Copied: branches/Cog/build.linux32ARM/makeproductclean (from rev 3353, branches/Cog/build.linux32ARM/makeproduct) =================================================================== --- branches/Cog/build.linux32ARM/makeproductclean (rev 0) +++ branches/Cog/build.linux32ARM/makeproductclean 2015-05-24 02:03:15 UTC (rev 3356) @@ -0,0 +1,9 @@ +#!/bin/bash +trap 'exit 2' HUP INT PIPE TERM +for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3 squeak.stack.spur squeak.stack.v3; do + if test -d "$d"; then + (cd $d;./makeallclean "$@") + else + echo no $d directory found + fi +done
Modified: branches/Cog/build.linux32x86/makeproduct =================================================================== --- branches/Cog/build.linux32x86/makeproduct 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/build.linux32x86/makeproduct 2015-05-24 02:03:15 UTC (rev 3356) @@ -2,7 +2,7 @@ trap 'exit 2' HUP INT PIPE TERM for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3; do if test -d "$d"; then - (cd $d;./makeallclean "$@") + (cd $d;./makealldirty "$@") else echo no $d directory found fi
Copied: branches/Cog/build.linux32x86/makeproductclean (from rev 3335, branches/Cog/build.linux32x86/makeproduct) =================================================================== --- branches/Cog/build.linux32x86/makeproductclean (rev 0) +++ branches/Cog/build.linux32x86/makeproductclean 2015-05-24 02:03:15 UTC (rev 3356) @@ -0,0 +1,9 @@ +#!/bin/bash +trap 'exit 2' HUP INT PIPE TERM +for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3; do + if test -d "$d"; then + (cd $d;./makeallclean "$@") + else + echo no $d directory found + fi +done
Modified: branches/Cog/build.linux64x64/makeproduct =================================================================== --- branches/Cog/build.linux64x64/makeproduct 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/build.linux64x64/makeproduct 2015-05-24 02:03:15 UTC (rev 3356) @@ -2,7 +2,7 @@ trap 'exit 2' HUP INT PIPE TERM for d in newspeak.cog.spur squeak.cog.spur; do if test -d "$d"; then - (cd $d;./makeallclean "$@") + (cd $d;./makealldirty "$@") else echo no $d directory found fi
Copied: branches/Cog/build.linux64x64/makeproductclean (from rev 3335, branches/Cog/build.linux64x64/makeproduct) =================================================================== --- branches/Cog/build.linux64x64/makeproductclean (rev 0) +++ branches/Cog/build.linux64x64/makeproductclean 2015-05-24 02:03:15 UTC (rev 3356) @@ -0,0 +1,9 @@ +#!/bin/bash +trap 'exit 2' HUP INT PIPE TERM +for d in newspeak.cog.spur squeak.cog.spur; do + if test -d "$d"; then + (cd $d;./makeallclean "$@") + else + echo no $d directory found + fi +done
Modified: branches/Cog/platforms/Cross/vm/sq.h =================================================================== --- branches/Cog/platforms/Cross/vm/sq.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Cross/vm/sq.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -39,10 +39,13 @@
/* Note: All pluggable primitives are defined as EXPORT(int) somePrimitive(void) - If the platform requires special declaration modifiers, the EXPORT - macro can be redefined. + All non-static variables in the VM and plugins are declared as + VM_EXPORT type var + If the platform requires special declaration modifiers, the EXPORT and + VM_EXPORT macros can be redefined. */ #define EXPORT(returnType) returnType +#define VM_EXPORT
/* Image save/restore macros. */
Modified: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h =================================================================== --- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Cross/vm/sqSCCSVersion.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -97,3 +97,29 @@ } return sourceVersion; } + + +#if VERSION_PROGRAM +# include "sq.h" + +int +main(int argc, char *argv[]) +{ + char vm_version[] = VM_VERSION; + + if (argc == 2 && !strcmp(argv[1], "VM_VERSION")) + printf("%s\n", vm_version); + else if (argc == 2 && !strcmp(argv[1], "VM_MAJOR")) + printf("%.*s\n", strchr(vm_version,'.') - vm_version, vm_version); + else if (argc == 2 && !strcmp(argv[1], "VM_MINOR")) + printf("%s\n", strchr(vm_version,'.') + 1, vm_version); + else if (argc == 2 && !strcmp(argv[1], "VM_RELEASE")) + printf("%s\n", revisionAsString()); + else if (argc == 2 && !strcmp(argv[1], "VERSION_TAG")) + printf("%s.%s\n", vm_version, revisionAsString()); + else + return 1; + + return 0; +} +#endif /* VERSION_PROGRAM */
Modified: branches/Cog/platforms/Cross/vm/sqVirtualMachine.h =================================================================== --- branches/Cog/platforms/Cross/vm/sqVirtualMachine.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Cross/vm/sqVirtualMachine.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -1,11 +1,17 @@ #ifndef _SqueakVM_H #define _SqueakVM_H
-/* We expect interp.h to define VM_PROXY_MAJOR & VM_PROXY_MINOR appropriately - * for the VM generated with it. +/* We expect interp.h to define VM_PROXY_MAJOR & VM_PROXY_MINOR, and other + * defines such as STACKVM, appropriately for the VM generated with it. */ #include "interp.h"
+#if SPURVM +# define VM_VERSION "5.0" +#else +# define VM_VERSION "4.5" +#endif + #ifndef VM_PROXY_MAJOR /* Increment the following number if you change the order of functions listed or if you remove functions */
Modified: branches/Cog/platforms/Mac OS/vm/config.h =================================================================== --- branches/Cog/platforms/Mac OS/vm/config.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Mac OS/vm/config.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -169,11 +169,6 @@
/* other configured variables */
-#if SPURVM -# define VM_VERSION "5.0" -#else -# define VM_VERSION "4.5" -#endif #define VM_MODULE_PREFIX "" /* #undef VM_DLSYM_PREFIX */ #define VM_X11DIR "/usr/X11R6/lib"
Modified: branches/Cog/platforms/Mac OS/vm/sqConfig.h =================================================================== --- branches/Cog/platforms/Mac OS/vm/sqConfig.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Mac OS/vm/sqConfig.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -20,3 +20,8 @@ #else # define VMBIGENDIAN 0 #endif + +#if defined(__GNUC__) +# define PlatformNoDbgRegParms __attribute__ ((regparm (0))) +# define NeverInline __attribute__ ((noinline)) +#endif
Modified: branches/Cog/platforms/Plan9/vm/config.h =================================================================== --- branches/Cog/platforms/Plan9/vm/config.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/Plan9/vm/config.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -121,8 +121,6 @@
/* other configured variables */
-#define SQ_VERSION "4.5" -#define VM_VERSION "4.5" #define VM_LIBDIR "" #define VM_MODULE_PREFIX "" #define VM_BUILD_STRING "Plan9 built on "__DATE__" "__TIME__
Modified: branches/Cog/platforms/iOS/vm/iPhone/config.h =================================================================== --- branches/Cog/platforms/iOS/vm/iPhone/config.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/iOS/vm/iPhone/config.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -190,11 +190,6 @@
/* other configured variables */
-#if SPURVM -# define VM_VERSION "5.0" -#else -# define VM_VERSION "4.5" -#endif #define VM_MODULE_PREFIX "" /* #undef VM_DLSYM_PREFIX */ #define VM_X11DIR "/usr/X11R6/lib"
Modified: branches/Cog/platforms/unix/config/Makefile.in =================================================================== --- branches/Cog/platforms/unix/config/Makefile.in 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/Makefile.in 2015-05-24 02:03:15 UTC (rev 3356) @@ -26,7 +26,7 @@ # # Author: ian.piumarta@inria.fr # -# Last edited: Tue Mar 2 16:59:47 PST 2010 by eliot +# Last edited: Sat May 23 18:45:43 PDT 2015 by eliot
@make_cfg@ @make_prg@ @@ -58,6 +58,10 @@ version.c : $(SQLIBS) ${cfgdir}/verstamp version.c $(CC)
+ +getversion : ${cfgdir}/getversion.c + $(CC) -o getversion $(CFLAGS) $(INCLUDES) ${cfgdir}/getversion.c + plugins : config.sh $(PLUGINS_LA)
# nuke everything but plugins.int & plugins.ext @@ -73,16 +77,17 @@ mkdir nps $(SHELL) -ec 'cd nps; ln -s $(topdir)/platforms/unix/npsqueak/* .'
-nps/npsqueak.so : nps +nps/npsqueak.so : nps getversion $(SHELL) -ec 'cd nps; $(MAKE) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'
# OSX app bundle
osxdir=$(topdir)/platforms/unix/vm-display-Quartz -app=Squeak-$(VM_MAJOR).$(VM_MINOR)-$(VM_RELEASE).app +#app=Squeak-$(VM_MAJOR).$(VM_MINOR)-$(VM_RELEASE).app +app=Squeak-`./getversion VM_MAJOR`.`./getversion VM_MINOR`-`./getversion VM_RELEASE`.app appdir=$(app)/Contents
-Squeak.app : squeak plugins Info.plist +Squeak.app : squeak plugins Info.plist getversion /bin/rm -rf $(app) mkdir -p $(appdir)/MacOS cp -p squeak $(appdir)/MacOS/. @@ -94,10 +99,8 @@ cp -pr $(osxdir)/Resources $(appdir)/. -find $(app) -name '*~' | xargs rm -f
-bndl_version=${VM_VERSION} (${SQ_VERSION}) - -Info.plist : $(osxdir)/Info.plist.in $(osxdir)/mkinfo - $(osxdir)/mkinfo $(osxdir)/Info.plist.in Info.plist.tmp "${bndl_version}" +Info.plist : $(osxdir)/Info.plist.in $(osxdir)/mkinfo getversion + $(osxdir)/mkinfo $(osxdir)/Info.plist.in Info.plist.tmp "`./getversion VM_VERSION`" mv Info.plist.tmp Info.plist
# OSX plugin bundle @@ -125,8 +128,8 @@
# manual page
-squeak.1 : $(topdir)/platforms/unix/doc/squeak.1 - $(cfgdir)/mkman $(VM_MAJOR) $(VM_VERSION) \ +squeak.1 : $(topdir)/platforms/unix/doc/squeak.1 getversion + $(cfgdir)/mkman `./getversion VM_MAJOR` `./getversion VM_VERSION` \ $(bindir) $(imgdir) $(plgdir) $(mandir) $(docdir) \ < $(topdir)/platforms/unix/doc/squeak.1 > $@
Modified: branches/Cog/platforms/unix/config/Makefile.install =================================================================== --- branches/Cog/platforms/unix/config/Makefile.install 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/Makefile.install 2015-05-24 02:03:15 UTC (rev 3356) @@ -15,7 +15,7 @@
# squeak
-install-squeak : $(squeak) +install-squeak : $(squeak) getversion $(MKINSTALLDIRS) $(ROOT)$(plgdir) $(MKINSTALLDIRS) $(ROOT)$(bindir) $(INSTALL_PROG) $(squeak) $(ROOT)$(plgdir) @@ -25,7 +25,7 @@ $(INSTALL_DATA) $(ICONS) $(ROOT)$(VM_APP_ICONS); \ fi
-uninstall-squeak : .force +uninstall-squeak : getversion .force if test -n "$(VM_APP_ICONS)"; then \ $(UNINSTALL) $(ROOT)$(VM_APP_ICONS); \ fi @@ -34,7 +34,7 @@
# plugins
-install-plugins : plugins +install-plugins : plugins getversion $(MKINSTALLDIRS) $(ROOT)$(plgdir) @list='$(PLUGINS_LA)'; for p in $$list; do \ if test -f */$$p; then \ @@ -44,7 +44,7 @@ done -rm $(ROOT)$(plgdir)/*.la
-uninstall-plugins : .force +uninstall-plugins : getversion .force @list='$(PLUGINS_LA)'; for p in $$list; do \ filename=$(ROOT)/$(plgdir)/`basename $$p .la`;\ if test -f $$filename; then \ @@ -92,7 +92,7 @@ rm -f inisqueak; \ $(LN_S) $$path/inisqueak .; )
-uninstall-image : +uninstall-image : getversion @$(UNINSTALL) $(ROOT)$(plgdir) Squeak$(SQ_VERSION).image.gz @$(UNINSTALL) $(ROOT)$(plgdir) Squeak$(SQ_VERSION).changes.gz @$(UNINSTALL) $(ROOT)$(plgdir) inisqueak @@ -108,8 +108,8 @@
# npsqueak
-install-npsqueak : npsqueak .force +install-npsqueak : npsqueak getversion .force $(SHELL) -ec 'cd nps; $(MAKE) install ROOT=$(ROOT) VM_VERSION=$(VM_VERSION) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'
-uninstall-npsqueak : npsqueak .force +uninstall-npsqueak : npsqueak getversion .force $(SHELL) -ec 'cd nps; $(MAKE) uninstall ROOT=$(ROOT) VM_VERSION=$(VM_VERSION) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'
Modified: branches/Cog/platforms/unix/config/acinclude.m4 =================================================================== --- branches/Cog/platforms/unix/config/acinclude.m4 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/acinclude.m4 2015-05-24 02:03:15 UTC (rev 3356) @@ -60,12 +60,12 @@
AC_DEFUN([AC_VM_VERSION],[ - VM_MAJOR=$1 - VM_MINOR=$2 - VM_RELEASE=$3 - SQ_MAJOR=$4 - SQ_MINOR=$5 - SQ_UPDATE=$6 +# VM_MAJOR=$1 +# VM_MINOR=$2 +# VM_RELEASE=$3 +# SQ_MAJOR=$4 +# SQ_MINOR=$5 +# SQ_UPDATE=$6 ])
Modified: branches/Cog/platforms/unix/config/config.h.in =================================================================== --- branches/Cog/platforms/unix/config/config.h.in 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/config.h.in 2015-05-24 02:03:15 UTC (rev 3356) @@ -161,8 +161,6 @@
/* other configured variables */
-#undef SQ_VERSION -#undef VM_VERSION #undef VM_MODULE_PREFIX #undef VM_DLSYM_PREFIX #undef VM_X11DIR
Modified: branches/Cog/platforms/unix/config/configure =================================================================== --- branches/Cog/platforms/unix/config/configure 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/configure 2015-05-24 02:03:15 UTC (rev 3356) @@ -463,7 +463,7 @@ # include <unistd.h> #endif"
-ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS cogit topdir cfgdir vmmdir vmpdir vmmcfg blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir expanded_relative_imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN CPP EGREP SED LN_S ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INCLUDES HAVE_INTERP_H ALLOCA INTERP AWK VM_APP_ICONS npsqueak install_nps uninstall_nps SQ_LIBDIR int_modules ext_modules HAVE_LANGINFO_CODESET HAVE_NANOSLEEP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_CPPFLAGS X_INCLUDES VM_DISPX11_OBJS VM_DISPX11_BITBLT_FLAGS BITBLT_OBJS BITBLT_FLAGS ARM_ARCH LIBM_CFLAGS IA32ABI_OBJS LIB_UUID int_plugins ext_plugins LIBOBJS LTLIBOBJS' +ac_subst_vars='NM LD SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS cogit topdir cfgdir vmmdir vmpdir vmmcfg blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION imgdir expanded_relative_imgdir plgdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WFLAGS AS RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN CPP EGREP SED LN_S ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INCLUDES HAVE_INTERP_H ALLOCA INTERP AWK VM_APP_ICONS npsqueak install_nps uninstall_nps SQ_LIBDIR int_modules ext_modules HAVE_LANGINFO_CODESET HAVE_NANOSLEEP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_CPPFLAGS X_INCLUDES VM_DISPX11_OBJS VM_DISPX11_BITBLT_FLAGS BITBLT_OBJS BITBLT_FLAGS ARM_ARCH LIBM_CFLAGS IA32ABI_OBJS LIB_UUID int_plugins ext_plugins LIBOBJS LTLIBOBJS' ac_subst_files='make_cfg make_int make_ext make_prg Makefile_install Makefile_dist Makefile_rpm Makefile_deb'
# Initialize some variables set by options. @@ -1538,12 +1538,12 @@ sqminor=`echo ${sqversion} | sed 's/^.*.//'`
- VM_MAJOR=${vmmajor} - VM_MINOR=${vmminor} - VM_RELEASE=${SVNREV} - SQ_MAJOR=${sqmajor} - SQ_MINOR=${sqminor} - SQ_UPDATE=0 +# VM_MAJOR=${vmmajor} +# VM_MINOR=${vmminor} +# VM_RELEASE=${SVNREV} +# SQ_MAJOR=${sqmajor} +# SQ_MINOR=${sqminor} +# SQ_UPDATE=0
topdir=`cd ${srcdir}/../../..; pwd` @@ -1675,24 +1675,21 @@
-VM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE} +#VM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE}
-cat >>confdefs.h <<_ACEOF -#define VM_VERSION "${VM_VERSION}" -_ACEOF +#AC_DEFINE_UNQUOTED(VM_VERSION, "${VM_VERSION}")
+#AC_SUBST(VM_MAJOR) +#AC_SUBST(VM_MINOR) +#AC_SUBST(VM_RELEASE) +#AC_SUBST(VM_VERSION)
- - - - - # libdir contains ${exec_prefix}, so we have to default and expand early test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' imgdir=`eval echo ${libdir}/squeak` expanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}` -plgdir='${imgdir}/'`eval echo ${VM_VERSION}` +plgdir='${imgdir}/`./getversion VERSION_TAG`'
@@ -5923,7 +5920,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5926 "configure"' > conftest.$ac_ext + echo '#line 5923 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6940,7 +6937,7 @@
# Provide some information about the compiler. -echo "$as_me:6943:" \ +echo "$as_me:6940:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: "$ac_compiler --version </dev/null >&5"") >&5 @@ -8003,11 +8000,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:8006: $lt_compile"" >&5) + (eval echo ""$as_me:8003: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8010: $? = $ac_status" >&5 + echo "$as_me:8007: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8271,11 +8268,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:8274: $lt_compile"" >&5) + (eval echo ""$as_me:8271: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8278: $? = $ac_status" >&5 + echo "$as_me:8275: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8375,11 +8372,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:8378: $lt_compile"" >&5) + (eval echo ""$as_me:8375: $lt_compile"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8382: $? = $ac_status" >&5 + echo "$as_me:8379: $? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9844,7 +9841,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 9847 "configure"' > conftest.$ac_ext + echo '#line 9844 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10741,7 +10738,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10744 "configure" +#line 10741 "configure" #include "confdefs.h"
#if HAVE_DLFCN_H @@ -10841,7 +10838,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10844 "configure" +#line 10841 "configure" #include "confdefs.h"
#if HAVE_DLFCN_H @@ -13184,11 +13181,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:13187: $lt_compile"" >&5) + (eval echo ""$as_me:13184: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13191: $? = $ac_status" >&5 + echo "$as_me:13188: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13288,11 +13285,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:13291: $lt_compile"" >&5) + (eval echo ""$as_me:13288: $lt_compile"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13295: $? = $ac_status" >&5 + echo "$as_me:13292: $? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13824,7 +13821,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 13827 "configure"' > conftest.$ac_ext + echo '#line 13824 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14882,11 +14879,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:14885: $lt_compile"" >&5) + (eval echo ""$as_me:14882: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14889: $? = $ac_status" >&5 + echo "$as_me:14886: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14986,11 +14983,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:14989: $lt_compile"" >&5) + (eval echo ""$as_me:14986: $lt_compile"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14993: $? = $ac_status" >&5 + echo "$as_me:14990: $? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16435,7 +16432,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 16438 "configure"' > conftest.$ac_ext + echo '#line 16435 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -17213,11 +17210,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:17216: $lt_compile"" >&5) + (eval echo ""$as_me:17213: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17220: $? = $ac_status" >&5 + echo "$as_me:17217: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17481,11 +17478,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:17484: $lt_compile"" >&5) + (eval echo ""$as_me:17481: $lt_compile"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17488: $? = $ac_status" >&5 + echo "$as_me:17485: $? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17585,11 +17582,11 @@ -e 's:.*FLAGS}{0,1} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo ""$as_me:17588: $lt_compile"" >&5) + (eval echo ""$as_me:17585: $lt_compile"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17592: $? = $ac_status" >&5 + echo "$as_me:17589: $? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19054,7 +19051,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 19057 "configure"' > conftest.$ac_ext + echo '#line 19054 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -29945,10 +29942,6 @@ s,@SQ_MINOR@,$SQ_MINOR,;t t s,@SQ_UPDATE@,$SQ_UPDATE,;t t s,@SQ_VERSION@,$SQ_VERSION,;t t -s,@VM_MAJOR@,$VM_MAJOR,;t t -s,@VM_MINOR@,$VM_MINOR,;t t -s,@VM_RELEASE@,$VM_RELEASE,;t t -s,@VM_VERSION@,$VM_VERSION,;t t s,@imgdir@,$imgdir,;t t s,@expanded_relative_imgdir@,$expanded_relative_imgdir,;t t s,@plgdir@,$plgdir,;t t
Modified: branches/Cog/platforms/unix/config/configure.ac =================================================================== --- branches/Cog/platforms/unix/config/configure.ac 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/configure.ac 2015-05-24 02:03:15 UTC (rev 3356) @@ -124,21 +124,21 @@ AC_SUBST(SQ_UPDATE) AC_SUBST(SQ_VERSION)
-VM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE} +#VM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE}
-AC_DEFINE_UNQUOTED(VM_VERSION, "${VM_VERSION}") +#AC_DEFINE_UNQUOTED(VM_VERSION, "${VM_VERSION}")
-AC_SUBST(VM_MAJOR) -AC_SUBST(VM_MINOR) -AC_SUBST(VM_RELEASE) -AC_SUBST(VM_VERSION) +#AC_SUBST(VM_MAJOR) +#AC_SUBST(VM_MINOR) +#AC_SUBST(VM_RELEASE) +#AC_SUBST(VM_VERSION)
# libdir contains ${exec_prefix}, so we have to default and expand early test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' imgdir=`eval echo ${libdir}/squeak` expanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}` -plgdir='${imgdir}/'`eval echo ${VM_VERSION}` +plgdir='${imgdir}/`./getversion VERSION_TAG`'
AC_SUBST(imgdir) AC_SUBST(expanded_relative_imgdir)
Added: branches/Cog/platforms/unix/config/getversion.c =================================================================== --- branches/Cog/platforms/unix/config/getversion.c (rev 0) +++ branches/Cog/platforms/unix/config/getversion.c 2015-05-24 02:03:15 UTC (rev 3356) @@ -0,0 +1,3 @@ +#define VERSION_PROGRAM 1 + +#include "sqSCCSVersion.h"
Modified: branches/Cog/platforms/unix/config/make.cfg.in =================================================================== --- branches/Cog/platforms/unix/config/make.cfg.in 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/config/make.cfg.in 2015-05-24 02:03:15 UTC (rev 3356) @@ -1,6 +1,6 @@ # make.cfg.in -- mf fragment for configured variables -*- makefile -*- # -# Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors +# Copyright (C) 1996-2015 by Ian Piumarta and other authors/contributors # listed elsewhere in this file. # All rights reserved. # @@ -20,28 +20,18 @@ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE.
# Author: Ian.Piumarta@inria.fr # -# Last edited: Tue Jan 26 11:48:03 PST 2010 by eliot +# Last edited: Fri May 22 11:16:24 PDT 2015 by eliot
MAKEFLAGS= --no-print-directory
@SET_MAKE@
-VM_MAJOR= @VM_MAJOR@ -VM_MINOR= @VM_MINOR@ -VM_RELEASE= @VM_RELEASE@ -VM_VERSION= @VM_VERSION@ - -SQ_MAJOR= @SQ_MAJOR@ -SQ_MINOR= @SQ_MINOR@ -SQ_UPDATE= @SQ_UPDATE@ -SQ_VERSION= @SQ_VERSION@ - DEVEL= @DEVEL@
host= @host@
Modified: branches/Cog/platforms/unix/vm/Makefile.in =================================================================== --- branches/Cog/platforms/unix/vm/Makefile.in 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/vm/Makefile.in 2015-05-24 02:03:15 UTC (rev 3356) @@ -71,7 +71,7 @@
sqNamedPrims$o : $(blddir)/sqNamedPrims.h
-# rebuild sqExtPrims sqUnixMain (VM_VERSION) if config.h changes +# rebuild sqExtPrims sqUnixMain if config.h changes
sqUnixExternalPrims$o sqUnixMain$o : ../config.h $(topdir)/platforms/unix/vm/dlfcn-dyld.c
Modified: branches/Cog/platforms/unix/vm/sqConfig.h =================================================================== --- branches/Cog/platforms/unix/vm/sqConfig.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/unix/vm/sqConfig.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -18,3 +18,8 @@ #else # define VMBIGENDIAN 1 #endif + +#if defined(__GNUC__) +# define PlatformNoDbgRegParms __attribute__ ((regparm (0))) +# define NeverInline __attribute__ ((noinline)) +#endif
Modified: branches/Cog/platforms/win32/vm/sqConfig.h =================================================================== --- branches/Cog/platforms/win32/vm/sqConfig.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqConfig.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -31,3 +31,8 @@ #endif
#define VMBIGENDIAN 0 + +#if defined(__GNUC__) && (__GNUC__ == 3 || (!defined(__MINGW32__) && !defined(__MINGW64__))) +# define PlatformNoDbgRegParms __attribute__ ((regparm (0))) +# define NeverInline __attribute__ ((noinline)) +#endif
Modified: branches/Cog/platforms/win32/vm/sqPlatformSpecific.h =================================================================== --- branches/Cog/platforms/win32/vm/sqPlatformSpecific.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqPlatformSpecific.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -45,7 +45,10 @@ #if defined(_MSC_VER) || defined(__MINGW32__) # undef EXPORT # define EXPORT(returnType) __declspec( dllexport ) returnType +# undef VM_EXPORT +# define VM_EXPORT __declspec( dllexport ) #endif + #if defined(_MSC_VER) || defined(__MINGW32__) # define fabsf(x) ((float)fabs((double)(x))) #endif
Modified: branches/Cog/platforms/win32/vm/sqWin32.h =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqWin32.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -25,17 +25,6 @@ #define FINALLY #endif
-#ifndef SQ_IMAGE_VERSION_MAJOR -#define SQ_IMAGE_VERSION_MAJOR 3 -#endif -#ifndef SQ_IMAGE_VERSION_MINOR -#define SQ_IMAGE_VERSION_MINOR 0 -#endif - -#if (SQ_IMAGE_VERSION_MAJOR < 2) -#error "These files are only for Squeak >= 2.0" -#endif - #define NO_TABLET
@@ -235,9 +224,6 @@ #define VERSION "" #endif
-#define VM_VERSION TEXT("Cog VM 4.0.0 (release) from ") TEXT(__DATE__) \ - TEXT("\n") TEXT("Compiler: ") TEXT(COMPILER) TEXT(VERSION) - /********************************************************/ /* image reversal functions */ /********************************************************/
Modified: branches/Cog/platforms/win32/vm/sqWin32Main.c =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32Main.c 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqWin32Main.c 2015-05-24 02:03:15 UTC (rev 3356) @@ -18,6 +18,7 @@ #include <float.h> #include <ole2.h> #include "sq.h" +#include "sqWin32Prefs.h" #include "sqAssert.h" #include "sqWin32Backtrace.h" #include "sqSCCSVersion.h" @@ -925,7 +926,7 @@ fprintf(f,"\n%s", gdInfoString);
/* print VM version information */ - fprintf(f,"\nVM Version: %s\n", VM_VERSION); + fprintf(f,"\nVM Version: %s\n", VM_VERSION_TEXT); #if STACKVM fprintf(f,"Interpreter Build: %s\n", __interpBuildInfo); # if COGVM
Modified: branches/Cog/platforms/win32/vm/sqWin32Prefs.c =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32Prefs.c 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqWin32Prefs.c 2015-05-24 02:03:15 UTC (rev 3356) @@ -397,7 +397,7 @@ void HandlePrefsMenu(int cmd) { switch(cmd) { case ID_ABOUT: - MessageBox(stWindow,VM_VERSION, + MessageBox(stWindow,VM_VERSION_TEXT, TEXT("About " VM_NAME " on Win32"), MB_OK); break; case ID_DEFERUPDATES:
Modified: branches/Cog/platforms/win32/vm/sqWin32Prefs.h =================================================================== --- branches/Cog/platforms/win32/vm/sqWin32Prefs.h 2015-05-21 22:26:17 UTC (rev 3355) +++ branches/Cog/platforms/win32/vm/sqWin32Prefs.h 2015-05-24 02:03:15 UTC (rev 3356) @@ -34,4 +34,20 @@ void CreatePrefsMenu(void); void HandlePrefsMenu(int);
+#if COGVM +# define NICKNAME "Cog" +#elif STACKVM +# define NICKNAME "Stack" +#else +# define NICKNAME "Interpreter" #endif +#if SPURVM +# define NICKNAME_EXTRA " Spur VM " +#else +# define NICKNAME_EXTRA " VM " +#endif + +#define VM_VERSION_TEXT TEXT(NICKNAME NICKNAME_EXTRA VM_VERSION) \ + TEXT(" (release) from ") TEXT(__DATE__) TEXT("\n") \ + TEXT("Compiler: ") TEXT(COMPILER) TEXT(VERSION) +#endif
On Sat, May 23, 2015 at 07:03:18PM -0700, commits@squeakvm.org wrote:
Revision: 3356 Author: eliot Date: 2015-05-23 19:03:15 -0700 (Sat, 23 May 2015) Log Message:
Move definition of VM_VERSION out of various sqConfig.h files and into platforms/Cross/vm/sqVirtualMachine.h.
#if SPURVM # define VM_VERSION "5.0" #else # define VM_VERSION "4.5" #endif
I know this is the oscog branch, but in principle the sqVirtualMachine.h header could be included from more than just Cog and Spur. It might be better to put VM_VERSION elsewhere if possible.
For reference, in the unix build for trunk (Cmake build process), VM_VERSION is defined in build/config.h. The definition is created by the configure script, which derives it from the VMM src version label and the SVN platforms version levels.
If the VM_VERSION definition for oscog could be put into a sqConfig.h file, that might be a better choice that would avoid later conflicts with trunk.
Dave
vm-dev@lists.squeakfoundation.org