Wykres commitów

68 Commity (afc67c6dc5c66f671efd6d1ebb2ed725ced8cb3e)

Autor SHA1 Wiadomość Data
Marcus von Appen 8ffc02495f - Let the build environment decide about the toolchain to be used, in case
there are special tweaks and paths to be considered. Just provide some
  defaults, in case the values are undefined.
- py-version.sh does not need any bash specific features.
- Use libdl only on Linux for now. FreeBSD provides dl*() calls from libc.
2014-06-07 09:16:42 +02:00
Paul Sokolovsky 168a9ce863 Revert "Fix DEBUG=1 builds"
This reverts commit 6e76f7bc90.

This patch tries to workaround a previous clang workaround. Instead of going
into workaround of workaround spiral, the original workaround should be tamed.
2014-05-28 15:28:30 +03:00
Dave Hylands 6e76f7bc90 Fix DEBUG=1 builds
Without this fix, I get the following error:

CC gccollect.c
gccollect.c: In function ‘gc_helper_get_regs’:
gccollect.c:63:1: error: bp cannot be used in asm here
2014-05-26 16:29:24 -07:00
Damien George ee3fd46f13 Rename configuration variables controling Python features.
Now of the form MICROPY_PY_*.  See issue #35.
2014-05-24 23:03:12 +01:00
Damien George 63436ce22e unix, Mac support: Generate order.def via Makefile. 2014-05-21 19:56:54 +01:00
Damien George 0fd01683c6 Merge pull request #607 from Anton-2/osx-clang
Allow compilation of unix port under clang on OS X
2014-05-21 19:51:05 +01:00
Paul Sokolovsky 0c124c3123 unix: Add "_os" module with stat().
stat() is bad function to use using FFI, because its ABI is largely private.
To start with, Glibc .so doesn't even have "stat" symbol. Then, layout of
struct stat is too implementation-dependent. So, introduce _os to deal
with stat() and other similar cases.
2014-05-14 22:08:45 +03:00
Antonin ENFRUN 6caae0bcb1 unix: Create __bss_start and _end symbols for Mach-O targets.
It's a hack, but can't find a cleaner way to do it.
2014-05-12 00:13:10 +02:00
Dave Hylands 117c46d9eb Add input command for unix 2014-05-07 07:19:51 -07:00
Ilya Dmitrichenko 8e998ed280 modffi: Fix how we call `pkg-config` 2014-04-20 09:30:46 +01:00
Damien George d553be5982 build: Simplify build directory layout by putting all headers in genhdr.
Any generated headers go in $(BUILD)/genhdr/, and are #included as
'genhdr/xxx.h'.
2014-04-17 18:03:27 +01:00
Damien George 2d1f865d16 Merge branch 'relocatable-build-dir' of github.com:lurch/micropython into lurch-relocatable-build-dir 2014-04-17 17:44:52 +01:00
Andrew Scheller e02b77bf6b Updated the envvar used by ./run-tests
As discussed in #504
2014-04-17 01:26:25 +01:00
Andrew Scheller 70a7d7a943 build directory can now be renamed
The autogenerated header files have been moved about, and an extra
include dir has been added, which means you can give a custom
BUILD=newbuilddir option to make, and everything "just works"

Also tidied up the way the different Makefiles build their include-
directory flags
2014-04-16 22:16:28 +01:00
Andrew Scheller d5ce916f26 Add 'test' target to unix/Makefile
In conjunction with #504 this allows you to do things like:
```shell
make -C unix clean && make -C unix test CC=gcc-4.7
```
all from the top-level micropython directory :-)

Something similar could probably be done for windows/Makefile too, but I don't have a cygwin setup to test with.
2014-04-16 20:38:16 +01:00
Andrew Scheller 571d5a3363 New config option MICROPY_FORCE_32BIT (defaulted to 0)
Makes it easier for 64-bit unix hosts to build 32-bit unix
binaries (for testing)
2014-04-16 01:46:01 +01:00
Damien George 3bb8bd899b Make USE_COMPUTED_GOTO a config option in mpconfig.h.
Disabled by default.  Enabled in unix port.
2014-04-14 21:20:30 +01:00
AZ Huang b1f692e82e Use computed goto instead of switching op-codes. 2014-04-15 02:40:28 +08:00
Paul Sokolovsky c39368427c unix: Rename module sources per latest naming conventions (mod*.c). 2014-04-04 20:34:10 +03:00
Paul Sokolovsky 793838a919 MICROPY_USE_READLINE: Selects link lib, so should be defined in mpconfigport.mk
This change allows to build unix version without libreadline installed.
2014-02-28 11:09:29 +02:00
Gordon McGregor 3890ec48e7 OS X compatible -map syntax for LDFLAGS 2014-02-14 16:38:05 -06:00
Paul Sokolovsky 5be1b2873b unix Makefile: Split off optimization options to COPT variable.
To allow easily try different optimization and configuration options
without patching any files.
2014-02-12 20:20:39 +02:00
Damien George 323f39a2b3 Merge pull request #278 from pfalcon/unix-gc
Enable GC for Unix port
2014-02-11 21:42:09 +00:00
Paul Sokolovsky e7db8171d8 unix: Implement garbage collection support. 2014-02-11 16:20:02 +02:00
Paul Sokolovsky 287d9620fc Enable link map file generation. 2014-02-11 14:42:20 +02:00
Paul Sokolovsky a9459bc723 unix: Add basic time module (with time() and clock() functions).
Both return int so far (single-precision float doesn't have enough
bits to represent int32 precisely).
2014-02-02 01:34:11 +02:00
Damien George a908202d60 unix: libffi include path now found using pkg-config.
Hopefully this works for other people as well :)
2014-02-01 18:48:19 +00:00
Paul Sokolovsky ed1239fce6 Add mpconfigport.mk file to configure which modules to include into build.
Proof of concept, controls "ffi" module as one which requires external
dependencies.
2014-02-01 20:09:45 +02:00
Damien George 8bf91f2a87 unix: Fix compile warnings for ffi module on 64-bit machine. 2014-01-28 23:08:11 +00:00
Paul Sokolovsky 60a9fac8d4 unix: Initial implementation of FFI module.
Foreign Function Interface module allows to load native dynamic libraries,
call functions and access variables in them. This makes possible to write
interface modules in pure Python.

This module provides thin wrapper around libffi. ctypes compatibility might
be possible to implement on top of this module (though ctypes allow to call
functions without prototypes, which is not supported by libffi (i.e.
implementation would be inefficient))).
2014-01-29 00:24:00 +02:00
Damien George 56bb636014 Change -Og to -O0 in unix-cpy/Makefile; cast to small int in socket.c. 2014-01-26 17:52:23 +00:00
Paul Sokolovsky e2febe90e3 unix Makefile: -Og doesn't work (at least) with gcc 4.6 below.
Also, don't try to force debug info format, use native.
2014-01-25 19:49:38 +02:00
Dave Hylands c89c681a9f Rework makefiles. Add proper dependency checking. 2014-01-24 08:46:48 -08:00
Damien George 55baff4c9b Revamp qstrs: they now include length and hash.
Can now have null bytes in strings.  Can define ROM qstrs per port using
qstrdefsport.h
2014-01-21 21:40:13 +00:00
Damien George 7d08935458 Rename unix binary to 'micropython'. 2014-01-20 00:02:39 +00:00
Paul Sokolovsky fc92608237 Add lean ("raw") socket module. 2014-01-19 00:16:39 +02:00
Damien George 5573f9f150 Merge branch 'str2int' of github.com:xyb/micropython into xyb-str2int
Conflicts:
	py/objint.c
	unix-cpy/Makefile
	unix/Makefile
2014-01-15 22:58:39 +00:00
xyb c178ea471e Implemented int(str) in UNIX 2014-01-14 21:39:05 +08:00
John R. Lenton 9549919349 made DEBUG control CFLAGS in Makefiles oter than stm as well. 2014-01-13 13:25:10 +00:00
Dave Hylands 4646801181 Make build output quieter.
Use make V=1e make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.

This should fix issue #117
2014-01-08 10:30:06 -08:00
Paul Sokolovsky e0e79ae6d6 unix: Add basic implementation of io.FileIO object.
Note: only read/write/close methods are defined so far, and class
is not exposed (use open() factory function, as usual).
2014-01-08 17:39:06 +02:00
Damien George 136f67523b Factor and simplify Makefile's and mpconfig. 2014-01-07 14:54:15 +00:00
Damien George 71c5181a8d Convert Python types to proper Python type hierarchy.
Now much more inline with how CPython does types.
2014-01-04 20:21:15 +00:00
Paul Sokolovsky d674bd5989 Convert USE_READLINE config option to be consistent with others. 2014-01-04 19:38:19 +02:00
Damien George e67ed5d285 Improve configurability for native x64/thumb emitter.
With MICROPY_EMIT_X64 and MICROPY_EMIT_THUMB disabled, the respective
emitters and assemblers will not be included in the code.  This can
significantly reduce binary size for unix version.
2014-01-04 13:55:24 +00:00
Paul Sokolovsky 1c6de11f77 Add basic implementation of slice object.
So far, only start and stop integer indexes are supported. Step is
not supported, as well as objects of arbitrary types.
2014-01-04 02:35:48 +02:00
Paul Sokolovsky b372bfca21 Rename default config file to mpconfig.h, and port's to mpconfigport.h.
mpconfig.h will automatically pull mpconfigport.h.
2014-01-03 19:03:11 +02:00
Damien George 66028ab6dc Basic implementation of import.
import works for simple cases.  Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
2014-01-03 14:03:48 +00:00
Damien George 2870862601 Add module object, to be used eventually for import. 2014-01-02 21:30:26 +00:00
Damien George 210a02e105 unix: revert Makefile to not use -ltermcap.
termcap is not needed on Linux.  Need to work out how to automatically
configure the Makefile...
2014-01-02 15:50:33 +00:00